Yagel Posted September 13, 2008 Share Posted September 13, 2008 (edited) This is my script: Func _okbutton() $VALUE2 = IniReadSection(@ScriptDir & "\inputs.ini", "DXwndMS") If @error Then $GAME2 = FileOpenDialog("Search your MapleStory client 1st", "C:\Nexon", "MapleStory Private Server Client (*.exe)", 1) If Not @error Then MsgBox(0, "Press OK again", "Press OK Again please") IniWrite(@ScriptDir & "\inputs.ini", "DXwndMS", "Path", $GAME2) Else Run(@ScriptDir & "\DXwnd\DXwnd.exe") WinWaitActive("DXWnd") WinActivate("DXWnd", "") sleep(120) send("{ALT}");Add and change second for every command. sleep(200) send("{RIGHT}") sleep(150) send("{DOWN 4} {ENTER}") sleep(200) send($VALUE2) sleep(300) send("{TAB 2}") sleep(150) send("{DOWN 3} {ENTER}") EndIf ( It's not all the script just some of it.. ) So it doesn't give any errors about the send($value2) , but it just doesn't do it.. what i want it to do is write the PATH he did in the iniReadSection.. So the program will write it in another place... Any other way?.. or help? Thanks from advance. Edited September 13, 2008 by Yagel Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 13, 2008 Share Posted September 13, 2008 Try using the Window Info tool to get the info for the control you need the data sent to and use ControlSend(). Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Yagel Posted September 13, 2008 Author Share Posted September 13, 2008 (edited) I did what you told me and after running the program and clicking on the function button it doing what it suppose to do until it get to the part ControlSend("Target Setup", "", "[CLASSNN:Edit1]", $GAME2) and gives me this error: C:\yaGz Trainer DXWND\main.au3 (62) : ==> Variable used without being declared.: ControlSend("Target Setup", "", "[CLASSNN:Edit1]", $GAME2) ControlSend("Target Setup", "", "[CLASSNN:Edit1]", ^ ERROR I know the problem is that $GAME2 is not declared , but it does , doesnt it? ( $GAME2 = FileOpenDialog("Search your MapleStory client 1st", "C:\Nexon", "MapleStory Private Server Client (*.exe)", 1) ) Edited September 13, 2008 by Yagel Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 13, 2008 Share Posted September 13, 2008 Try ControlSend("Target Setup","","Edit1",$game2) Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Yagel Posted September 13, 2008 Author Share Posted September 13, 2008 Still, does the same , there is no any other way it will ask him where is the file only ONE time , AND still remember what/where path he wrote? So i can write it in another program.. i know i can do it with $Something = InputBox .. thingy and then do Send($Something) and it works 100% , but the problem is, everytime he clickes the button it will ask again and again , so this is why i use the IniRead... Link to comment Share on other sites More sharing options...
Bowmore Posted September 13, 2008 Share Posted September 13, 2008 Still, does the same , there is no any other way it will ask him where is the file only ONE time , AND still remember what/where path he wrote? So i can write it in another program.. i know i can do it with $Something = InputBox .. thingy and then do Send($Something) and it works 100% , but the problem is, everytime he clickes the button it will ask again and again , so this is why i use the IniRead... Try this Func _okbutton() Local $VALUE2 = IniReadSection(@ScriptDir & "\inputs.ini", "DXwndMS") If $VALUE2 = "" Or @error Then $VALUE2 = FileOpenDialog("Search your MapleStory client 1st", "C:\Nexon", "MapleStory Private Server Client (*.exe)", 1) If Not @error Then MsgBox(0, "Press OK again", "Press OK Again please") IniWrite(@ScriptDir & "\inputs.ini", "DXwndMS", "Path", $VALUE2) EndIf Run(@ScriptDir & "\DXwnd\DXwnd.exe") WinWaitActive("DXWnd") WinActivate("DXWnd", "") Sleep(120) Send("{ALT}");Add and change second for every command. Sleep(200) Send("{RIGHT}") Sleep(150) Send("{DOWN 4} {ENTER}") Sleep(200) Send($VALUE2) Sleep(300) Send("{TAB 2}") Sleep(150) Send("{DOWN 3} {ENTER}") EndFunc ;==>_okbutton "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Yagel Posted September 13, 2008 Author Share Posted September 13, 2008 Wow! i think I'm in love with you! , i was working hour's for that.. Thank you very much , I very appreciate that! And BTW , how can i make a Browse button next to it [ to make the button next to it i know.. ] that if the user wants to update the location so it will update the location in the inputs.ini too? I know its too much asking, but examples REALLY helps me understand how AutoIT works! Thanks again.. Link to comment Share on other sites More sharing options...
Yagel Posted September 14, 2008 Author Share Posted September 14, 2008 Wow! i think I'm in love with you! , i was working hour's for that.. Thank you very much , I very appreciate that! And BTW , how can i make a Browse button next to it [ to make the button next to it i know.. ] that if the user wants to update the location so it will update the location in the inputs.ini too? I know its too much asking, but examples REALLY helps me understand how AutoIT works! Thanks again.. Anyone ? , little help? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now