Sign in to follow this  
Followers 0
Yagel

IniRead Question...

8 posts in this topic

#1 ·  Posted (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 by Yagel

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Yagel

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0