 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Procyan
Joined: 03 Sep 2008 Posts: 4 Location: Germany
|
Posted: Thu Sep 04, 2008 12:27 pm Post subject: Why are my variables not excepting my input? <SOLVED> |
|
|
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 Thu Sep 04, 2008 1:23 pm; edited 1 time in total |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Thu Sep 04, 2008 12:44 pm Post subject: Re: Why are my variables not excepting my input? |
|
|
| Code: | | Gui, Add, Edit, w50 vdodaac |
The above is correct, but you have to remove the v in the following line
Do correct rest of the similar errors.
 _________________ URLGet - Internet Explorer based Downloader |
|
| Back to top |
|
 |
Procyan
Joined: 03 Sep 2008 Posts: 4 Location: Germany
|
Posted: Thu Sep 04, 2008 1:01 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 454 Location: canada
|
Posted: Thu Sep 04, 2008 1:11 pm Post subject: |
|
|
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=- |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Thu Sep 04, 2008 1:15 pm Post subject: |
|
|
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 |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|