Jump to content

Increasing a Hex value by one


Cormin
 Share

Go to solution Solved by Melba23,

Recommended Posts

  • Moderators
  • Solution

Cormin,

One last push! :D

Send("^c")                      ; Copy the highlighted content
Sleep(100)                      ; Let the system stablilise
$vValue = Dec(ClipGet())        ; Place the value in a variable and convert to decimal
$vValue = $vValue + 1           ; Add 1 to the value
Send(Hex($vValue, 4))           ; Send the amended value back to the app - change the numeric value 4 if you need more characters
Are we there yet? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Are we there yet? :huh:

M23

 

YES!!

If you have a bitcoin address PM it to me :thumbsup:  :thumbsup:

Also if it's quick and easy I would like to add a couple things.  If it's not quick then don't worry about it since it has been a long day for you.

I would like to Prevent two scripts from being opened, have the Esc key kill the script entirely and have left ctrl pause/resume it.

Again only if they're quick, I seriously appreciate it!

Edited by Cormin
Link to comment
Share on other sites

  • Moderators

Cormin,

Hurrah! :party:

If you have a bitcoin address PM it to me

Thanks, but I would prefer that you donate to the site to help with the server costs. ;)

To prevent a script from being opened when it is already running look at _Singleton in the Help file. :)

For the other 2 requests you can use HotKeys - but although not too complicated to code, that will have to wait until tomorrow. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Cormin,

Hurrah! :party:

Thanks, but I would prefer that you donate to the site to help with the server costs. ;)

To prevent a script from being opened when it is already running look at _Singleton in the Help file. :)

For the other 2 requests you can use HotKeys - but although not too complicated to code, that will have to wait until tomorrow. ;)

M23

 

You sir are a wonderful person, have a nice day!

Link to comment
Share on other sites

  • Moderators

Cormin,

And after a good night's sleep, here is the solution to the exit/pause question. I have modified your script so that you can follow it in the SciTE console and check that it does actually pause and then carry on: ;)

HotKeySet("{ESC}", "On_Exit")
HotKeySet("{PAUSE}", "TogglePause")

Global $gbPaused = False

Func TogglePause()
    $gbPaused = Not $gbPaused
    If $gbPaused Then ConsoleWrite("- " & @MSEC & " Paused!" & @CRLF)
    While $gbPaused
        Sleep(100)
    WEnd
    ConsoleWrite("+ " & @MSEC & " Running again!" & @CRLF)
    ToolTip("")
EndFunc   ;==>TogglePause

Func On_Exit()
    ConsoleWrite("! " & @MSEC & " Exiting!" & @CRLF)
    Exit
EndFunc


ConsoleWrite(@MSEC & " - Waiting for window 1!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 1 found!" & @CRLF)
ConsoleWrite(@MSEC & " - Clicking mouse 1!" & @CRLF)
Sleep ( 1000 )
ConsoleWrite(@MSEC & " - Waiting for window 2!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 2 found!" & @CRLF)
ConsoleWrite(@MSEC & " - Clicking mouse 2!" & @CRLF)
Sleep ( 1500 )
ConsoleWrite(@MSEC & " - Clicking mouse3!" & @CRLF)
Sleep ( 9000 )
ConsoleWrite(@MSEC & " - Clicking mouse 4!" & @CRLF)
Beep(500, 500)
Sleep ( 800 )
ConsoleWrite(@MSEC & " - Clicking mouse 5!" & @CRLF)
Sleep ( 800 )
ConsoleWrite(@MSEC & " - Sending BackSpace!" & @CRLF)
Beep(500, 250)
Sleep ( 5000 )
ConsoleWrite(@MSEC & " - Clicking mouse 6!" & @CRLF)
Sleep ( 1000 )
ConsoleWrite(@MSEC & " - Clicking mouse 7!" & @CRLF)
Beep(500, 500)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Clicking mouse 8!" & @CRLF)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Sending BackSpace!" & @CRLF)
Beep(500, 250)
Sleep ( 5000 )
ConsoleWrite(@MSEC & " - Waiting for window 3!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 3 found!" & @CRLF)
ConsoleWrite(@MSEC & " - Clicking mouse 9!" & @CRLF)
Sleep ( 800 )
ConsoleWrite(@MSEC & " - Clicking mouse 10!" & @CRLF)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Clicking mouse 11!" & @CRLF)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Sending BackSpace/BackSpace/02/Enter!" & @CRLF)
Sleep ( 800 )
ConsoleWrite(@MSEC & " - Clicking mouse 12!" & @CRLF)
Sleep ( 500 )
Beep(700, 500)
Sleep ( 5000 )
ConsoleWrite(@MSEC & " - Waiting for window 4!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 4 found!" & @CRLF)
ConsoleWrite(@MSEC & " - Clicking mouse 13!" & @CRLF)
Sleep ( 5000 )
Beep(600, 500)
Sleep ( 5000 )
ConsoleWrite(@MSEC & " - Clicking mouse 14!" & @CRLF)
Sleep ( 1000 )
ConsoleWrite(@MSEC & " - Waiting for window 5!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 5 found!" & @CRLF)
ConsoleWrite(@MSEC & " - Clicking mouse 15!" & @CRLF)
Sleep ( 1000 )
ConsoleWrite(@MSEC & " - Clicking mouse 16!" & @CRLF)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Waiting for window 6!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 6 found!" & @CRLF)
Sleep ( 2000 )
ConsoleWrite(@MSEC & " - Clicking mouse 17!" & @CRLF)
Sleep ( 1000 )
ConsoleWrite(@MSEC & " - Clicking mouse 18!" & @CRLF)
Beep(500, 250)
Sleep ( 4000 )
ConsoleWrite(@MSEC & " - Clicking mouse 19!" & @CRLF)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Waiting for window 7!" & @CRLF)
Sleep(500)
ConsoleWrite(@MSEC & " - Window 7 found!" & @CRLF)
Sleep ( 500 )
ConsoleWrite(@MSEC & " - Clicking mouse 20!" & @CRLF)
Beep(700, 300)
Beep(700, 300)
As I said, pretty simple - but please ask if you have any questions. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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