Created
February 3, 2023 16:10
-
-
Save JoeGlines/bbede65dcf5319016ac5d616df65ff7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey courses. | |
;They're structured in a way to make learning AHK EASY: https://the-Automator.com/Learn | |
;******************************************************* | |
#Include <default_Settings> | |
;************************************** | |
var= | |
( | |
Email First_Name Last_Name | |
[email protected] Joe King | |
[email protected] Joseph GLines | |
) | |
;*********Use For loop over Var going line by line********************* | |
for i, row in Loopobj:=StrSplit(var,"`n","`r`n") { ;Parse Var on each new line | |
SetTaskbarProgress((i/(Loopobj.Count()-1))*100,"P",WinExist("ahk_class AutoHotkeyGUI")) ;pwb is to IE, N=green, P=Yellow E=Red ;Taskbar notifier for loop | |
IfEqual, i,1,continue ;Skip header row | |
IfLessOrEqual,i,4382,continue | |
IfEqual, row,,continue ;Skip loop if blank | |
IfEqual, row,Stop,break ;Break if stop (not case sensitive) | |
IfEqual, row,%var%,continue ;Note- need to use percents if variable | |
IfEqual, row,1,SetEnv,Data,Region SBE MonthCalYear ;set header row in loop | |
Menu , tray, tip, % round((i-1)/(Loopobj.Count()-1)*100) "% done. " i-1 " of " Loopobj.Count()-1 " : email is " StrSplit(row,"`t").1 ;Show progress on icon in system tray | |
MsgBox % StrSplit(row,"`t").1 a_tab StrSplit(row,"`t").2 a_tab StrSplit(row,"`t").3 ;demonstrate values | |
if(mod(i,10)=0) ;Use this if want to step every 10th item | |
msgbox % i a_tab "10th step" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment