AutoHotkey Community

It is currently May 26th, 2012, 5:27 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: April 16th, 2009, 6:44 pm 
just read the "gui, add" part but it doesn't say where you give an ID to the item -- right now I'm using guicontrol and the full name of the buttons, text fields, etc, but this is cumbersome... what's the parameter please?

I even did a full-text search in the helpfile for "ControlID" (the name of the GuiControl parameter) but this word is only used in GuiControl!

Thanks!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 16th, 2009, 6:48 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
AFAIK, the id is the name of whatever variable you have assigned to the control. This may not be true/possible for all control types...

Edit: Example:
Code:
gui,add,edit,vThisEdit w200,blah blah
gui,add,button,gClicky,Click
gui,show
return

clicky:
guicontrol,,ThisEdit,%A_Now%
return

guiclose:
exitapp
Return

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 16th, 2009, 7:12 pm 
Rhys wrote:
AFAIK, the id is the name of whatever variable you have assigned to the control. This may not be true/possible for all control types...

Edit: Example:
Code:
gui,add,edit,vThisEdit w200,blah blah
gui,add,button,gClicky,Click
gui,show
return

clicky:
guicontrol,,ThisEdit,%A_Now%
return

guiclose:
exitapp
Return


Thanks. Why would a button have a variable? What is the g mean, is it a "go-to" label? I can't imagine what else it would stand for. Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 16th, 2009, 7:26 pm 
this
Code:
Gui, Add, Button,  x370 gClicky, Click me
GuiControl, Hide, gClicky


totally doesn't work -- it complains about the first line! :evil:

any ideas?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 16th, 2009, 7:35 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
Try adding a variable name to the button (you have added a gosub name) using vClicky.

When you use guicontrol, drop the 'v' from the name since it's not really part of the variable's name.
Code:
Gui, Add, Button,  x370 vClicky, Click me
GuiControl, Hide, Clicky

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
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: batto, mrhobbeys, MSN [Bot], Mtes, perlsmith, Yahoo [Bot] and 65 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:
cron
Powered by phpBB® Forum Software © phpBB Group