Jump to content

pls help send key using a variable


 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 10 years later...

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
Link to comment
Share on other sites

@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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...