monoscout999 Posted August 30, 2011 Share Posted August 30, 2011 This is an usefull tool when you want to move controls in your in-process GUI, and you have to change a lot of numbers in the script Just Configure the operation you desire, select a number and press F2 and the number will be replaced. expandcollapse popup#include <windowsconstants.au3> #include <EditConstants.au3> HotKeySet("{F2}", "_Substitute") HotKeySet("{ESC}", "_exit") GUICreate("Clip Substitute by monoscout999", 200, 105) $r1 = GUICtrlCreateRadio("Add", 5, 5, 80, 20) GUICtrlSetState(-1, 1) $r2 = GUICtrlCreateRadio("Subtract", 5, 30, 80, 20) $r3 = GUICtrlCreateRadio("Multiply", 105, 5, 80, 20) $r4 = GUICtrlCreateRadio("Divide", 105, 30, 80, 20) $Input = GUICtrlCreateInput("", 5, 55, 190, 20, $ES_NUMBER) $r5 = GUICtrlCreateRadio("Replace", 5, 80, 80, 20) GUISetState() Do Until GUIGetMsg() = -3 Func _exit() Exit EndFunc ;==>_exit Func _Substitute() Local $OldClip = ClipGet() Send("^c") Local $InputRead = Number(GUICtrlRead($Input)) Local $Number = Number(ClipGet()) Select Case GUICtrlRead($r1) = 1 Local $Result = $Number + $InputRead Case GUICtrlRead($r2) = 1 Local $Result = $Number - $InputRead Case GUICtrlRead($r3) = 1 Local $Result = $Number * $InputRead Case GUICtrlRead($r4) = 1 Local $Result = $Number / $InputRead Case GUICtrlRead($r5) = 1 Local $Result = $InputRead EndSelect ClipPut($Result) Send("^v") ClipPut($OldClip) EndFunc ;==>_Substitute Link to comment Share on other sites More sharing options...
matwachich Posted August 30, 2011 Share Posted August 30, 2011 I like this!!! Thanks for the idea! Link to comment Share on other sites More sharing options...
monoscout999 Posted August 31, 2011 Author Share Posted August 31, 2011 Just a snnipet this can be inproved Link to comment Share on other sites More sharing options...
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