AutoHotkey Community

It is currently May 27th, 2012, 1:35 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: May 21st, 2009, 5:32 pm 
I searched for a few hours and could not find this so I thought I would post this for people that have to fill in web forms over and over again, it makes a small box at upper right hand corner and gives you 3 seconds to move your courser to the form blank. Thanks for all your help here folks, thought I would contribute.


Code:
Gui, Add, Button, x2 y2 w100 h20 gH1Button, first name
Gui, Add, Button, x2 y22 w100 h20 gH2Button, last name
Gui, Add, Button, x2 y42 w100 h20 gH3Button, address 1
Gui, Add, Button, x2 y62 w100 h20 gH4Button, address 2
Gui, Add, Button, x2 y82 w100 h20 gH5Button, city
Gui, Add, Button, x2 y102 w100 h20 gH6Button, state
Gui, Add, Button, x2 y122 w100 h20 gH7Button, zip
Gui, Add, Button, x2 y142 w100 h20 gH8Button, phone
Gui, Add, Button, x2 y162 w100 h20 gH9Button, @email.com
Gui, Add, Button, x2 y182 w100 h20 gG1Button, pwd
Gui, Show, x1160 y89 h206 w117, New GUI Window
Return

GuiClose:
ExitApp

H1Button:
sleep, 3000
              Send, first name
Return
;-----------------
H2Button:
sleep, 3000
              Send, last name
Return
;-----------------
H3Button:
sleep, 3000
              Send, address 1
Return
;-----------------
H4Button:
sleep, 3000
              Send, address 2
Return
;-----------------
H5Button:
sleep, 3000
              Send, city
Return
;-----------------
H6Button:
sleep, 3000
              Send, state
Return
;-----------------
H7Button:
sleep, 3000
              Send, zip
Return
;-----------------
H8Button:
sleep, 3000
              Send, phone
Return
;-----------------
H9Button:
sleep, 3000
              Send, @email.com
Return
;-----------------
G1Button:
sleep, 3000
              Send, pwd
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2009, 1:15 am 
Offline

Joined: May 16th, 2009, 4:15 pm
Posts: 18
Location: TW
Some modification based on your ogirinal one

1) Unify the subroutine send key label (%A_GuiControl%) instead
2) wait left-click to trigger (KeyWait, Lbutton, D T3)
=> don't have to wait for full 3 seconds
3) Click tray icon to show/hide the GUI
4) GUI always on top


Code:
Menu, Tray, NoStandard
Menu, Tray, Add, Auto Fill, TrayClick
Menu, Tray, Add,
Menu, Tray, Standard
Menu, Tray, Default, Auto Fill
Menu, Tray, Click, 1

Gui, Add, Button, x2 y2 w100 h20 gH_Button, first name
Gui, Add, Button, x2 y22 w100 h20 gH_Button, last name
Gui, Add, Button, x2 y42 w100 h20 gH_Button, address 1
Gui, Add, Button, x2 y62 w100 h20 gH_Button, address 2
Gui, Add, Button, x2 y82 w100 h20 gH_Button, city
Gui, Add, Button, x2 y102 w100 h20 gH_Button, state
Gui, Add, Button, x2 y122 w100 h20 gH_Button, zip
Gui, Add, Button, x2 y142 w100 h20 gH_Button, phone
Gui, Add, Button, x2 y162 w100 h20 gH_Button, @email.com
Gui, Add, Button, x2 y182 w100 h20 gG1Button, pwd
Gui, +AlwaysOnTop
Gui, Show, x1160 y89 h206 w117, New GUI Window

Return

GuiSize:
   If A_EventInfo <> 1  ; Minimized
        Return
GuiClose:
   Gui, cancel  ; hide the window
   return

H_Button:
   Sleep,200
   KeyWait, Lbutton, D T3
   Sleep,200
   if !ErrorLevel
      Send, %A_GuiControl%
Return

;-----------------
G1Button:
   Sleep,200
   KeyWait, Lbutton, D T3
   Sleep,200
   if !ErrorLevel
      Send, password
Return

TrayClick:
   GuiControlGet, isVisible, Visible, pwd
   if isVisible
      Gui, Cancel
   else
      Gui, Show
   return

_________________
Eucaly61's DIY World (Mainly in Chinese)
http://eucaly61.blogspot.com/search/label/AutoHotKey


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 17 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