Jump to content
Sign in to follow this  

Tiny operation Tool (Good for redesign GUIs)

Recommended Posts


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.

#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)
Until GUIGetMsg() = -3
Func _exit()
EndFunc   ;==>_exit
Func _Substitute()
Local $OldClip = ClipGet()
Local $InputRead = Number(GUICtrlRead($Input))
Local $Number = Number(ClipGet())
  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
EndFunc   ;==>_Substitute

Share this post

Link to post
Share on other sites

I like this!!! Thanks for the idea!

Share this post

Link to post
Share on other sites

Just a snnipet this can be inproved

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.