Jump to content

Need help


Recommended Posts

hey ppl im new here say welcome ^__^ first of all my english is bad (im brazilian 14 years old) ok lets help me

look i have a code that i need 2 know how can my program read what the user wrote in the inputbox... i tried use guictrlread() but this only ready my "text" part of the imput code :) i ll show u all my code (nothing 2 big):

#include <GUIConstants.au3>
GUICreate("AutoLoginMacro","350","250")
GUISetState(@SW_SHOW)
$res1= GUICtrlCreateButton("800x600","10","10","100","50")
$res2=GUICtrlCreateButton("1024x768","115","10","100","50")
$res3=GUICtrlCreateButton("1152x864","10","65","100","50")
$password=GUICtrlCreateInput("d",120,130,120,25,$ES_PASSWORD)
$passcheck=GUICtrlRead($password)
$text1=GUICtrlCreateEdit("Password:"& @CRLF,10,130,100,25,$ES_READONLY)
$check=GUICtrlCreateCheckbox("Save Password",10,160)
$read=GUICtrlRead($check)
If FileExists("login.ini")then
    $passcheck = IniRead("login.ini","password","pass","")
Else
    $passcheck=GUICtrlRead($password)
EndIf
While 1
    $msg = GUIGetMsg()
Select
Case $msg=$res1
    GUISetState(@SW_HIDE)
    Run("ROSEonline.exe")
    WinWaitActive("www.roseonline.com","Play R.O.S.E !!!")
    MouseClick("left",401,483)
WinWaitActive("RoseOnline")
Send("{TAB}")
Send($passcheck)
Send("{ENTER}")
Exit

Case $msg =$res2
GUISetState(@SW_HIDE)
    Run("ROSEonline.exe")
WinWaitActive("www.roseonline.com","Play R.O.S.E !!!")
    MouseClick("left",434,586)
WinWaitActive("RoseOnline")
Send("{TAB}")
Send($passcheck)
Send("{ENTER}")
Exit
    
Case $msg=$res3
GUISetState(@SW_HIDE)
    Run("ROSEonline.exe")
WinWaitActive("www.roseonline.com","Play R.O.S.E !!!")
    MouseClick("left",478,628)
WinWaitActive("RoseOnline")
Send("{TAB}")
Send($passcheck)
Send("{ENTER}")
Do
    $ch1 = PixelGetColor(899,375)
Until $ch1=3351057
MouseClick("left",761,376,2)

Do
    $char = PixelGetColor(448,481)
Until $char=12088787
    MouseClick("left",258,595,2)

Exit
Case $msg=$check
IniWrite("login.ini","password","pass",$passcheck)
    EndSelect
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

tell me whats wrong with this code plz...

if u want 2 teach me use well autoIT u r welcome 2 (this is my 3rd day programming ^__^) cyaa guys and answer fast ok? :evil:

Link to comment
Share on other sites

What you have to remember is that when the user checks save password it is saved at that exact time.

#include <GUIConstants.au3>
GUICreate("AutoLoginMacro", "350", "250")
GUISetState(@SW_SHOW)
$res1 = GUICtrlCreateButton("800x600", "10", "10", "100", "50")
$res2 = GUICtrlCreateButton("1024x768", "115", "10", "100", "50")
$res3 = GUICtrlCreateButton("1152x864", "10", "65", "100", "50")
$password = GUICtrlCreateInput("d", 120, 130, 120, 25, $ES_PASSWORD)
$passcheck = GUICtrlRead($password)
$text1 = GUICtrlCreateEdit("Password:" & @CRLF, 10, 130, 100, 25, $ES_READONLY)
$check = GUICtrlCreateCheckbox("Save Password", 10, 160)
$read = GUICtrlRead($check)
If FileExists("login.ini") Then
    $passcheck = IniRead("login.ini", "password", "pass", "")
Else
    $passcheck = GUICtrlRead($password)
EndIf
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $res1
            GUISetState(@SW_HIDE)
            Run("ROSEonline.exe")
            WinWaitActive("www.roseonline.com", "Play R.O.S.E !!!")
            MouseClick("left", 401, 483)
            WinWaitActive("RoseOnline")
            Send("{TAB}")
            Send($passcheck)
            Send("{ENTER}")
            Exit
            
        Case $msg = $res2
            GUISetState(@SW_HIDE)
            Run("ROSEonline.exe")
            WinWaitActive("www.roseonline.com", "Play R.O.S.E !!!")
            MouseClick("left", 434, 586)
            WinWaitActive("RoseOnline")
            Send("{TAB}")
            Send($passcheck)
            Send("{ENTER}")
            Exit
            
        Case $msg = $res3
            GUISetState(@SW_HIDE)
            Run("ROSEonline.exe")
            WinWaitActive("www.roseonline.com", "Play R.O.S.E !!!")
            MouseClick("left", 478, 628)
            WinWaitActive("RoseOnline")
            Send("{TAB}")
            Send($passcheck)
            Send("{ENTER}")
            Do
                $ch1 = PixelGetColor(899, 375)
            Until $ch1 = 3351057
            MouseClick("left", 761, 376, 2)
            
            Do
                $char = PixelGetColor(448, 481)
            Until $char = 12088787
            MouseClick("left", 258, 595, 2)
            
            Exit
        Case $msg = $check
            IniWrite("login.ini", "password", "pass", GUICtrlRead($password))
    EndSelect
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...