AutoHotkey Community

It is currently May 26th, 2012, 11:58 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 4th, 2008, 1:27 pm 
Offline

Joined: September 4th, 2008, 12:07 am
Posts: 4
Location: Germany
This should be an easy question for the experienced here.

Code:
SetTitleMatchMode, 2
#4::

Gui, Add, Text,, Please enter the line you want to start at:
Gui, Add, Text,, What is the ship to DODAAC?
Gui, Add, Text,, What are the disposition instructions?
Gui, Add, Edit, w50 vstart ym
Gui, Add, Edit, w50 vdodaac
Gui, Add, Edit, w200 vdispo r5
Gui, Add, Button, default ym, OK
Gui, Show,, Automatic Disposition Provider
return

GuiClose:
ButtonOK:
Gui, Submit

SendInput !d javascript:document.fldForm.select%vstart%.focus(){Enter}
Sleep 150
Send U
Sleep 50
SendInput !d javascript:document.fldForm.ship_to_DODAAC_%vstart%.focus(){Enter}
Sleep 150
Send %vdodaac%
Sleep 50
SendInput !d javascript:document.fldForm.PROV_REMARKS_%vstart%.focus(){Enter}
Sleep 150
Send %vdispo%


Yesterday I made my first GUI and I though I had the coding correct but my variables are not working.


Last edited by Procyan on September 4th, 2008, 2:23 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 4th, 2008, 1:44 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Code:
Gui, Add, Edit, w50 vdodaac

The above is correct, but you have to remove the v in the following line

Code:
Send %vdodaac%


Do correct rest of the similar errors.

:)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 2:01 pm 
Offline

Joined: September 4th, 2008, 12:07 am
Posts: 4
Location: Germany
I deleted the V from the variables and it still does not work. I wanted to try a different method so I wipped up some Input boxes and tried them and they work. I wonder why?

Code:
SetTitleMatchMode, 2
#4::

;Gui, Add, Text,, Please enter the line you want to start at:
;Gui, Add, Text,, Please enter the line you want to end at:
;Gui, Add, Text,, What is the ship to DODAAC?
;Gui, Add, Text,, What are the disposition instructions?
;Gui, Add, Edit, w50 start ym
;Gui, Add, Edit, w50 end
;Gui, Add, Edit, w50 dodaac
;Gui, Add, Edit, w200 dispo r5
;Gui, Add, Button, default ym, OK
;Gui, Show,, Automatic Disposition Provider
;return

;GuiClose:
;ButtonOK:
;Gui, Submit

InputBox, start, Lines, How many lines?

InputBox, dodaac, DODAAC, What is the ship to DODAAC?

InputBox, dispo, Disposition, What are the Disposition Instructions for this piece of equipment?

SendInput !d javascript:document.fldForm.select%start%.focus(){Enter}
Sleep 150
Send U
Sleep 50
SendInput !d javascript:document.fldForm.ship_to_DODAAC_%start%.focus(){Enter}
Sleep 150
Send %dodaac%
Sleep 50
SendInput !d javascript:document.fldForm.PROV_REMARKS_%start%.focus(){Enter}
Sleep 150
Send %dispo%


It must be something in the GUI command that I got wrong. I guess I can work with the Input Boxes but the GUI interface is much nicer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 2:11 pm 
Offline

Joined: November 5th, 2007, 7:25 pm
Posts: 454
Location: canada
As SKAN mentionned you have it upside down.. variables in gui keep V variables outside gui loose the V as in

Code:
SetTitleMatchMode, 2
#4::
;;;;;;;;V is REQUIRED in GUI
Gui, Add, Text,, Please enter the line you want to start at:
Gui, Add, Text,, What is the ship to DODAAC?
Gui, Add, Text,, What are the disposition instructions?
Gui, Add, Edit, w50 vstart ym
Gui, Add, Edit, w50 vdodaac
Gui, Add, Edit, w200 vdispo r5
Gui, Add, Button, default ym, OK
Gui, Show,, Automatic Disposition Provider
return

GuiClose:
ButtonOK:
Gui, Submit

;;;;;;;;V is REMOVED here
SendInput !d javascript:document.fldForm.select%start%.focus(){Enter}
Sleep 150
Send U
Sleep 50
SendInput !d javascript:document.fldForm.ship_to_DODAAC_%start%.focus(){Enter}
Sleep 150
Send %dodaac%
Sleep 50
SendInput !d javascript:document.fldForm.PROV_REMARKS_%start%.focus(){Enter}
Sleep 150
Send %dispo%

_________________
-=Raz=-


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 2:15 pm 
You've to assign the variable to its Gui-Control adding 'v' to the variables name (you 'flag' it). Outside any 'Gui'-settings use the variables name without the 'v'.

Quote:
Gui, Add, Edit, vMeineVariable, Testeingabe
Gui, Show,, Test
Return

!y:: ; press ALT+y
GuiControl,, MeineVariable, Ich bin die Textersetzung
Return


Report this post
Top
  
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: Bing [Bot], BrandonHotkey, Google Feedfetcher and 19 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