ioa747 Posted February 24, 2023 Share Posted February 24, 2023 try it SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 24, 2023 Author Share Posted February 24, 2023 8 minutes ago, ioa747 said: try it It also starts with $Enable = True and can use NumLock to get "It's a simply text" and Icon is Blue Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 (edited) and it's not what we want? What i try to achive: Double click on script ESC to make $Enable = True and then NumLock = It's a simply qestion Edited February 24, 2023 by ioa747 SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 24, 2023 Author Share Posted February 24, 2023 2 minutes ago, ioa747 said: and it's not what we want? xDD ❤️ That's what we want, But is it possible to have Red Icon after (Click on script / Start script)? And it's turning blue after first ESC -> Then numlock gives It's a simply question, And after second ESC it's red again 😎 Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 just changed the red with the blue SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 you did it? all good? SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 24, 2023 Author Share Posted February 24, 2023 Still no, Thank you for your time gonna live with what i have Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 last shot expandcollapse popup#include <misc.au3> Local $Enabled, $SleepTime $Enabled = True Enabled() ;************************************************ While 1 Sleep($SleepTime) WEnd ;************************************************ Exit ;---------------------------------------------------------------------------------------- Func start() ; While $Enabled Sleep(10) If _IsPressed("90") Then ; 90 NUM LOCK key ;~ ConsoleWrite(":") Sleep(50) Send("Its") Sleep(200) Send("a simply") Sleep(200) Send("text") Sleep(150) EndIf WEnd EndFunc ;==>start ;---------------------------------------------------------------------------------------- Func Enabled() If $Enabled = True Then TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico") $Enabled = False $SleepTime = 1000 Else TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Blue.ico") $Enabled = True $SleepTime = 10 HotKeySet("{ESC}", "Enabled") start() EndIf EndFunc ;==>Enabled SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 24, 2023 Author Share Posted February 24, 2023 (edited) idk if you joking cuz of my newbi skills or just don't get what i mean xD anyway appreciate for your time Edited February 24, 2023 by SevenScript Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 (edited) I just help I want with Thank you for your time gonna live with what i have i thought you were tired, and for that i say last shot I apologize if I said something I should not Edited February 24, 2023 by ioa747 SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 24, 2023 Author Share Posted February 24, 2023 No, no Func Enabled() If $Enabled = True Then TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico") $Enabled = False $SleepTime = 1000 Else TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Blue.ico") $Enabled = True $SleepTime = 10 HotKeySet("{ESC}", "Enabled") start() EndIf EndFunc ;==>Enabled You just changed icon red to True and Blue to False I wish to have True = Blue, False = Red But after script start, program is as Red = $Enable = False, So Numlock is dezactive untill i press ESC first time. Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 (edited) No I didn't change the icons i change the start status in line 6 $Enabled = True and then call Enabled() which means that it starts off and you have to press esc to be activated PS If you don't want it and you want to start activated just comment the line 6 to ; $Enabled = True Edited February 24, 2023 by ioa747 SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 24, 2023 Author Share Posted February 24, 2023 ; $Enabled = True Enabled() NumLock still gives "It's a simply text" from beggining 😞 Link to comment Share on other sites More sharing options...
ioa747 Posted February 24, 2023 Share Posted February 24, 2023 (edited) then make $Enabled = True which means that NumLock gives nothing and then have first press esc to activate Edited February 24, 2023 by ioa747 SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 25, 2023 Author Share Posted February 25, 2023 Hmm, true with $Enabled = True Enabled() NumLock is Off but now ESC doesn't make it Active anymore Link to comment Share on other sites More sharing options...
ioa747 Posted February 25, 2023 Share Posted February 25, 2023 (edited) hmm you have right wait.. HotKeySet("{ESC}", "Enabled") come out of the if statement Func Enabled() If $Enabled = True Then TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico") $Enabled = False $SleepTime = 1000 Else TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Blue.ico") $Enabled = True $SleepTime = 10 start() EndIf HotKeySet("{ESC}", "Enabled") EndFunc ;==>Enabled Edited February 25, 2023 by ioa747 SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 25, 2023 Author Share Posted February 25, 2023 expandcollapse popup#include <misc.au3> Local $Enabled, $SleepTime start() Enabled() While 1 Sleep($SleepTime) WEnd Func start() ; While $Enabled Sleep(10) If _IsPressed("90") Then ; 90 NUM LOCK key Sleep(50) Send("Its") Sleep(200) Send("a simply") Sleep(200) Send("text") Sleep(150) EndIf WEnd EndFunc ;==>start Func Enabled() if $Enabled = True Then start() $Enabled = False $SleepTime = 1000 Else $Enabled = True $SleepTime = 10 HotKeySet("{ESC}", "Enabled") EndIf EndFunc That gives good results at beggiining. NumLock is dezactive untill i press ESC Then is active and gives It's a simply text. But... can't dezactive numlock with next ESC 🙈 Link to comment Share on other sites More sharing options...
ioa747 Posted February 25, 2023 Share Posted February 25, 2023 (edited) I changed the name so as not to be confused expandcollapse popup#include <misc.au3> Local $HotKeyActive, $SleepTime $HotKeyActive = True Enabled() ;************************************************ While 1 Sleep($SleepTime) WEnd ;************************************************ Exit ;---------------------------------------------------------------------------------------- Func start() ; While $HotKeyActive Sleep(10) If _IsPressed("90") Then ; 90 NUM LOCK key ;~ ConsoleWrite(":") Sleep(50) Send("Its") Sleep(200) Send("a simply") Sleep(200) Send("text") Sleep(150) EndIf WEnd EndFunc ;==>start ;---------------------------------------------------------------------------------------- Func Enabled() If $HotKeyActive = True Then TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico") $HotKeyActive = False $SleepTime = 1000 Else TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Blue.ico") $HotKeyActive = True $SleepTime = 10 start() EndIf HotKeySet("{ESC}", "Enabled") EndFunc ;==>Enabled Edited February 25, 2023 by ioa747 rename the $Enabled to $HotKeyActive SevenScript 1 I know that I know nothing Link to comment Share on other sites More sharing options...
SevenScript Posted February 25, 2023 Author Share Posted February 25, 2023 1 minute ago, ioa747 said: expandcollapse popup#include <misc.au3> Local $Enabled, $SleepTime $Enabled = True Enabled() ;************************************************ While 1 Sleep($SleepTime) WEnd ;************************************************ Exit ;---------------------------------------------------------------------------------------- Func start() ; While $Enabled Sleep(10) If _IsPressed("90") Then ; 90 NUM LOCK key ;~ ConsoleWrite(":") Sleep(50) Send("Its") Sleep(200) Send("a simply") Sleep(200) Send("text") Sleep(150) EndIf WEnd EndFunc ;==>start ;---------------------------------------------------------------------------------------- Func Enabled() If $Enabled = True Then TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Red.ico") $Enabled = False $SleepTime = 1000 Else TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", $STR_NOCASESENSEBASIC, -1) - 1) & "\Icons\MyAutoIt3_Blue.ico") $Enabled = True $SleepTime = 10 start() EndIf HotKeySet("{ESC}", "Enabled") EndFunc ;==>Enabled Wow it's trully working!! 😎 i wish someone gonna help you with whatever you need someday 💯 Have a good night going study that code xD ioa747 1 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