Jump to content

Recommended Posts

Posted (edited)

$asdf = 5
Send("    value of asdf = {" & $asdf & "}")
I just tested, this has a problem when

$asdf = 50

it displays

value of asdf = 5

Please Correct this

Edited by sumit
Posted

It's the curly braces. Don't know if you need them or not, but if you want them in a Send command, try this:

$asdf = 50
Send("    value of asdf = {{}" & $asdf & "{}}")
BlueBearrOddly enough, this is what I do for fun.
Posted

Doubt that ... :)

im not kidding ...

CODE
$asdf = 50

Run("notepad.exe")

WinActivate("Untitled")

Sleep(1000)

Send(" value of asdf = {" & $asdf & "}")

Try for yourself

Please Everybody try this and tell me that my autoit is not corrupted. I get value of asdf = 5

Posted

im not kidding ...

CODE
$asdf = 50

Run("notepad.exe")

WinActivate("Untitled")

Sleep(1000)

Send(" value of asdf = {" & $asdf & "}")

Try for yourself

Please Everybody try this and tell me that my autoit is not corrupted. I get value of asdf = 5

AutoIT is fine, your brain is corrupted.

Are you trying to send the value 50 or ASCII key 50?

Posted

Joon sent you the wrong fix from your original code.

Original:

$asdf = 5
Send("    value of asdf = $asdf")oÝ÷ ØX±yÖ®¶­sbb33c¶6FbÒP¥6VæBgV÷C²fÇVRöb6FbÒgV÷C²fײb33c¶6Fb
Posted

Joon sent you the wrong fix from your original code.

Original:

$asdf = 5
Send("    value of asdf = $asdf")oÝ÷ ØX±yÖ®¶­sbb33c¶6FbÒP¥6VæBgV÷C²fÇVRöb6FbÒgV÷C²fײb33c¶6Fb
You should read the whole post before commenting about someone's brain. I was asking for help because i didnt know the syntax . Thanks for finally giving correct syntax
Posted (edited)

AutoIT is fine, your brain is corrupted.

Are you trying to send the value 50 or ASCII key 50?

No... something is odd here... :)

With Send(" value of asdf = " & $asdf) I get this in notepad:

value of asdf = 50

With Send(" value of asdf = {" & $asdf & "}") I get:

value of asdf = 5

ASCII conversion was the first I thought of, except Chr(50) = 2, and Chr(0x50) = P.

The ASCII for 5 is 53 or 0x35.

Something really is odd here...

;)

Edit: The correct Send() format for an ASCII code is: Send(" value of asdf = {ASC " & $asdf & "}"), and that yields as expected:

value of asdf = 2

I'm confused...

;)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
  • Developers
Posted

ASCII conversion was the first I thought of, except Chr(50) = 2, and Chr(0x50) = P.

The ASCII for 5 is 53 or 0x35.

Something really is odd here...

:)

Edit: The correct Send() format for an ASCII code is: Send(" value of asdf = {ASC " & $asdf & "}"), and that yields as expected:

value of asdf = 2

I'm confused...

;)

{50} is not a valid syntax ...

Think it just sends the first character and then normally expects a space and a number to repeat it x times.

As far as I can tell from the OP's request the proper code should be:

Send("  value of asdf = " & $asdf)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
×
×
  • Create New...