AutoHotkey Community

It is currently May 26th, 2012, 4:36 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Login script Help!!
PostPosted: March 27th, 2009, 10:33 pm 
Offline

Joined: January 20th, 2009, 9:11 pm
Posts: 26
Code:
Login = Portableapps Login
Gui, 2:+ToolWindow
Gui, 2:Add, Edit, x92 y12 w110 h20 ,
Gui, 2:Add, Edit, x92 y42 w110 h20 ,
Gui, 2:Add, Text, x12 y12 w70 h20 vPUsername, Username
Gui, 2:Add, Text, x12 y42 w70 h20 vPassword, Password
Gui, 2:Add, Button, x22 y72 w70 h20 , OK
Gui, 2:Add, Button, x122 y72 w70 h20 , Cancel
; Generated using SmartGUI Creator 4.0
Gui, 2:Show, x299 y200 h108 w222, %Login%
Return

2ButtonCancel:
2GuiClose:
2GuiEscape:
Gui Destroy
return

2ButtonOK:
Return

#IfWinActive Portableapps Login
Enter::ControlClick Button1, OK


What I need help with:
1. Need a function for the OK button. I want it to login to portableapps.com
2. Password field needs to be covered in astericks
3. #IfWinActive does not work


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2009, 5:09 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Code:
Login = Portableapps Login
Gui, 2:+ToolWindow
Gui, 2:Add, Edit, x92 y12 w110 h20 vPUsername
Gui, 2:Add, Edit, x92 y42 w110 h20 vPassword Password
Gui, 2:Add, Text, x12 y12 w70 h20, Username
Gui, 2:Add, Text, x12 y42 w70 h20, Password
Gui, 2:Add, Button, x22 y72 w70 h20 Default, OK
Gui, 2:Add, Button, x122 y72 w70 h20 , Cancel
Gui, 2:Show, x299 y200 h108 w222, %Login%
Return

2ButtonCancel:
2GuiClose:
2GuiEscape:
Gui, 2:Destroy
ExitApp
Return

2ButtonOK:
;Put code for loging in here
Return
Your main mistake was putting the options for your edit controls in the text controls. It should work now. Also putting default in a buttons options makes pressing enter equal to pressing the button. Also the script becomes useless after the gui is destroyed so its best to use ExitApp to end the script at that point.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2009, 2:45 pm 
Offline

Joined: January 20th, 2009, 9:11 pm
Posts: 26
It is part of a bigger script. I don't want it to exit the app.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2009, 5:01 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Then remove ExitApp...
Does the rest of the script work for you?

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 28th, 2009, 6:57 pm 
Offline

Joined: January 20th, 2009, 9:11 pm
Posts: 26
Yes it does, thank you for the help


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Miguel, notsoobvious, SKAN, tterB, Yahoo [Bot] and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group