PDA

View Full Version : please. i need help??



osamaelbazyehya
10-19-2009, 06:46 PM
first: sorry for my bad language

shortly. for example

if i have 3 Buttons on my project

it is possible??? when i click button 2.

a code like this "File.Open("AutoPlay\\Docs\\222.txt", "", SW_SHOWNORMAL);"

pasted to Button 1 on click action

and
when i click button 3.

a code like this "File.Open("AutoPlay\\Docs\\333.txt", "", SW_SHOWNORMAL);"

pasted to Button 1 on click action

jassing
10-19-2009, 08:05 PM
"technically" the answer is no.
but conceptually, yes.
you just need to use variables to hold the file you wish to open in your button 3.. however, I think you need to take a step back and consider why you're being so jumbled in your approach.

Sakuya
10-20-2009, 12:18 AM
first: sorry for my bad language

shortly. for example

if i have 3 Buttons on my project

it is possible??? when i click button 2.

a code like this "File.Open("AutoPlay\\Docs\\222.txt", \"\", SW_SHOWNORMAL);"

pasted to Button 1 on click action

and
when i click button 3.

a code like this "File.Open("AutoPlay\\Docs\\333.txt", "", SW_SHOWNORMAL);"

pasted to Button 1 on click action

Technically, yes.


Page.SetObjectScript("Button3", "On Click", "File.Open(\"AutoPlay\\Docs\\333.txt\", "", SW_SHOWNORMAL);");

Adapt it to your own needs.