Jump to content

how do i do "$count" but in hex


 Share

Recommended Posts

$count = 1

Do

; Print the count

send("$count")

send("{ENTER}")

; Increase the count by one

$count = $count + 1

Until $count > 99

HOW do i do this in HEX numbers? and do Until $count > FF (where it will go 19 to 1A)

and how do i make it to send "01" instead of "1"

Edited by findmyip
Link to comment
Share on other sites

$count = 1

Do

; Print the count

send("$count")

send("{ENTER}")

; Increase the count by one

$count = $count + 1

Until $count > 99

HOW do i do this in HEX numbers? and do Until $count > FF (where it will go 19 to 1A)

and how do i make it to send "01" instead of "1"

Look up Hex in the help, it does what you want.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

$count = 1

Do

; Print the count

send("$count")

send("{ENTER}")

; Increase the count by one

$count = $count + 1

Until $count > 99

HOW do i do this in HEX numbers? and do Until $count > FF (where it will go 19 to 1A)

and how do i make it to send "01" instead of "1"

i looked up hex but still no idea

Link to comment
Share on other sites

  • Developers

i looked up hex but still no idea

To get you started:

$count = 1
Do
    ; Print the count
    Send(Hex($count))
    Send("{ENTER}")
    ; Increase the count by one
    $count = $count + 1
Until $count > 99

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

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