 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Mon Apr 25, 2005 4:51 am Post subject: Goto |
|
|
| Code: | Gui, Add, Edit, vInput x6 y50 w390 h20, Input
Gui, Add, Button, +Default gEnterCommand x406 y50 w60 h20, Enter
Gui, Add, Edit, ReadOnly vLogOSD x6 y80 w460 h140, LogOut
Gui, Add, Text, vSyntax x6 y10 w460 h30, CommandSyntax
Gui, Show, x0 y0 h234 w474, AHK Command Line Console
Return
;------------------------------------------------------------------
EnterCommand:
Gui, Submit, NoHide
StringSplit, Param, Input, `,
;###############################CommandLineTreeBelow#############################
If Param1 = Send
Send, %Param2%
If Param1 = Goto
Goto, %Param2%
;Keeps Log
If Log =
Log = %Input%
Else
Log = %Input%`n%Log%
GuiControl,, LogOSD, %Log%
Return
Hello:
MsgBox, Helloworld
Return |
The above cannot find the hello label when "Goto, hello" is entered. Can Gosub, and Goto allow vars for the label to exe? _________________ my lame sig  |
|
| Back to top |
|
 |
niwi
Joined: 27 Feb 2005 Posts: 128 Location: Heidelberg, Germany
|
Posted: Mon Apr 25, 2005 5:48 am Post subject: |
|
|
Hi,
try this:
| Code: | If Param1 = Goto
{
msgbox, param2: -%Param2%-
Goto, %Param2%
} |
You have to enter the commands without blanks. Or you have to remove all leading and ending blanks of you parameters:
| Code: | | StringSplit, Param, Input, `, , %A_Space% %A_Tab% |
NiWi. |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Mon Apr 25, 2005 5:53 am Post subject: |
|
|
thats a no-go.  _________________ my lame sig  |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Mon Apr 25, 2005 8:49 am Post subject: |
|
|
Put this just after the Gui Submit:
StringReplace, Input, Input, %A_Space%,, 1
Taking away the spaces (if any) makes it work. _________________
 |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Mon Apr 25, 2005 8:53 am Post subject: |
|
|
thanks titan, that does it _________________ my lame sig  |
|
| 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
|