casanova Posted February 23, 2004 Posted February 23, 2004 Hi, I am trying to use ClipGet within a program, but it does not seem to work. Here is what I do -- I select a text - using CTRL C. Next I invoke a *.au3 script. The script has code something like -- $bugnumber = ClipGet() Send ( '"& $bugnumber &"' ) . But what really gets sent is - "& $bugnumber &" - the literal string. Am I doing something wrong here? Can I do copy a text, and then invoke a au3 script, and still expect it to get it?? Cheers, Casa.
CyberSlug Posted February 23, 2004 Posted February 23, 2004 (edited) Do not put variable names in quotes. Anything in quotes is interpreted exactly as a literal string* $x = "hello" MsgBox(0,"", "The variable named $x contains the word " & $x) *Okay, so there are a few exceptions.... namely Opt("ExpandEnvStrings",1) and the quotation mark characters themselves.... Edited February 23, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
casanova Posted February 23, 2004 Author Posted February 23, 2004 That worked. But here is what the help file on Send says -- If you with to use a variable for the count, try $n = 4 Send("+{TAB " & $n & "}") I picked it up from there. Maybe I am reading this wrong. Anyways, removing the quotes does work!
Valik Posted February 23, 2004 Posted February 23, 2004 That worked. But here is what the help file on Send says -- If you with to use a variable for the count, try $n = 4 Send("+{TAB " & $n & "}")I picked it up from there. Maybe I am reading this wrong. Anyways, removing the quotes does work!In the line below, I've made each set of quotes color-coded so you can see where they start and end. Now you should be able to see why it works.Send("+{TAB " & $n & "}")
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now