scriptshark Posted March 22, 2022 Posted March 22, 2022 (edited) Good day my friends, how can i have priority over this script? i tried google and searching but i think i cant find the right question to ask? #priority1 if $4 = 1 Then ControlSend($hHandle,"","","{4}") Sleep(500) EndIf #priority2 if $e = 1 Then ControlSend($hHandle,"","","{e}") Sleep(500) EndIf #priority3 if $r = 1 Then ControlSend($hHandle,"","","{r}") Sleep(500) EndIf Edited March 22, 2022 by scriptshark
KaFu Posted March 22, 2022 Posted March 22, 2022 (edited) Like this? #priority1 If $4 = 1 Then ControlSend($hHandle, "", "", "{4}") Sleep(500) Else #priority2 If $e = 1 Then ControlSend($hHandle, "", "", "{e}") Sleep(500) Else #priority3 If $r = 1 Then ControlSend($hHandle, "", "", "{r}") Sleep(500) EndIf EndIf EndIf or this should work likewise Select Case $4 = 1 #priority1 ControlSend($hHandle, "", "", "{4}") Sleep(500) Case $e = 1 #priority2 ControlSend($hHandle, "", "", "{e}") Sleep(500) Case $r = 1 #priority3 ControlSend($hHandle, "", "", "{r}") Sleep(500) EndSelect Edit: Removed orphaned "then" in select statement Edited March 22, 2022 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
scriptshark Posted March 22, 2022 Author Posted March 22, 2022 im more comfortable using the first option i will try that one, but the second option looks cleaner lol. i will test it thank you so much!
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