Jump to content
Sign in to follow this  
NEVERMORE

pls help send key using a variable

Recommended Posts

NEVERMORE

help pls is this possibLE?

im using:

$variable = {F12}

send ("$variable")

it types $variable instead of pressing F12 :)

Share this post


Link to post
Share on other sites
Roofel

Do not use the "" in Variable:) Use Send($Variable) should work then:)

Difference between

Send("$Variable") - You tell the Script to send the word "$Variable"

Send($Variable) - You tell the Script to look at $Variable for information to send:) Hope you figure it out

Edited by Roofel

Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Share this post


Link to post
Share on other sites
d4rk

put it an example with some program which has F12 hotkey

then you'll see


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
senatin

I cant figure Out what format is needed to call a key from variable to be send through send("{"{F10}" DOWN}")

$myValue = "F10"

Send("{"&"{"$myValue&"}"&" Down}")

it send me [

i want this code to press down F10
Please anyone help me

 

Answer
I found solution LOL so simple yet I complicate things
 

$myValue = "F10"

Send("{"&$myValue&" Down}")

The Answer

Edited by senatin

Share this post


Link to post
Share on other sites
caramen

@senatin It is not called format but "Syntaxe" So you know for next time. 

 

What was the point of posting here in stead of making new thread ?

AutoIT is evoluting so old thread from 10 years... ? It does not work the same way over the years. (Even if it s not the case for this thread ;) )

Edited by caramen

IUIAutomation From Junkew || WebDriver From Danp2 || And Water's UDF in the Quote|| >>HIt The Thanks Button.<<

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
senatin

Thank you!!!
All I do is search and search so I thought because my issue is almost the same So i posted it here

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×