Jump to content

Send a varible


Recommended Posts

How does one just that

i am thinking that Send ("$VAR") was it but thats not right it types $VAR then,

then i tried Send ($VAR) now it types nothing and at last i tried Send $VAR nothing worked what am i doing wrong?

sry found it :lmao: in the faq

Edited by no_messiah
Link to comment
Share on other sites

How does one just that

i am thinking that Send ("$VAR") was it but thats not right it types $VAR then,

then i tried Send ($VAR) now it types nothing and at last i tried Send $VAR nothing worked what am i doing wrong?

sry found it :lmao: in the faq

<{POST_SNAPBACK}>

Send ($VAR, 1) is the way to write it. Also for other functions it changes the way you have to type the varaible in. Its one things thats gets newbies like you and me.

.

Link to comment
Share on other sites

Send ($VAR, 1) is the way to write it. Also for other functions it changes the way you have to type the varaible in. Its one things thats gets newbies like you and me.

<{POST_SNAPBACK}>

Store the contents of a function in a variable

$var = function()

Write the contents of a variable to a window

Send($var,0) ; normal - default

Send($var,1) ; RAW

You can send the contents either normal or RAW. Normal treats any special formatting characters like you would expect send to treat them. ! = alt, ^ = Ctrl, etc.

RAW "keys what you see" and sends ^ as ^, ! as !, etc.

You don't have to specifiy the send mode, it will default to normal.

If the contents of your variable are nul or empty, then the send command won't do much. You may want to add a test for a nul string. In fact, testing whether or not the string contains something is an excellent error trap.

Dim $x

HotKeySet("ESC","StopScript")

While 1
   $x = ClipGet()
      If $x = "" then 
         MsgBox(0,"Empty","Clipboard was empty")
      Else
         MsgBox(0,"Clipboard","Clipboard Contents: " & $x)
      EndIf
WEnd

Func StopScript()
   Exit
EndFunc

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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...