AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Goto

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Mon Apr 25, 2005 4:51 am    Post subject: Goto Reply with quote

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 Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
niwi



Joined: 27 Feb 2005
Posts: 128
Location: Heidelberg, Germany

PostPosted: Mon Apr 25, 2005 5:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Mon Apr 25, 2005 5:53 am    Post subject: Reply with quote

thats a no-go. Crying or Very sad
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Mon Apr 25, 2005 8:49 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Mon Apr 25, 2005 8:53 am    Post subject: Reply with quote

thanks titan, that does it
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group