Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to send a variable


  • Please log in to reply
7 replies to this topic
skidmark
  • Members
  • 3 posts
  • Last active: Jan 15 2010 09:29 PM
  • Joined: 15 Jan 2010
Hi, How do you send a variable. I can send a keystroke. I'm totally confused

regards Skidmark :oops:

  • Guests
  • Last active:
  • Joined: --
var = abc

send %var%


skidmark
  • Members
  • 3 posts
  • Last active: Jan 15 2010 09:29 PM
  • Joined: 15 Jan 2010
Hi,
That what i thought but


Gui, Add, Edit, vdesc

send %vdesc%

does not send my inputted text to my programs editable field

Tuncay n-l-i mobile
  • Guests
  • Last active:
  • Joined: --
gui vars are saved to var after "Gui, Submit, NoHide"

baddog
  • Guests
  • Last active:
  • Joined: --

Hi,
That what i thought but


Gui, Add, Edit, vdesc

send %vdesc%

does not send my inputted text to my programs editable field

You would save a lot of confusion concerning what you are trying to accomplish if you would either more clearly describe the problem or post your code so we can see what you are trying to do.

Given that, I guess you are trying to change the text in a (edit) control in your gui. If that is what you need, use the command GuiControl .

skidmark
  • Members
  • 3 posts
  • Last active: Jan 15 2010 09:29 PM
  • Joined: 15 Jan 2010
Hi, This is what I have:

Gui, Add, Text,, Please Enter a Description
Gui, Add, Edit, vdesc
Gui, Add, Button, default, OK
Gui, Show
return

buttonOK:
Gui, Submit, nohide
winactivate Individual's Information
Send !a
winwait,,1
send Census
send {tab}
winwait,,1
send %vdesc%


The word census gets into the first editable field and the send {tab} works. But still no variable appears in the second editable field

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
send %[color=red]v[/color]desc%
Remove the v v is not part of the variable name it indicates desc is variable from your gui, read the docs

baddog
  • Guests
  • Last active:
  • Joined: --

The word census gets into the first editable field and the send {tab} works. But still no variable appears in the second editable field

You are not using the true variable name. Try it this way
Gui, Add, Text,, Please Enter a Description 
Gui, Add, Edit, vdesc 
Gui, Add, Button, default, OK 
Gui, Show 
return 

buttonOK: 
Gui, Submit, nohide 
winactivate Individual's Information 
Send !a 
winwait,,1 
send Census 
send {tab} 
winwait,,1 
send %desc% ; NOT vdesc