ahmetpi 0 Posted December 8, 2020 Hi, I am kinda noob I have an ini file which contains time and website url. I want the website to be opened at the time specified as the key in the ini file. I made a simple program. But it's run exe only the first key and value in the ini file. How can I loop this? Thanks in advance example ini file: [MONDAY] 06:00=https://google.com/ 07:00=https://facebook.com/ my code: Global $inifile = IniReadSection(@ScriptDir & "\example.ini", "MONDAY") $hour1 = $inifile[1][0] $url1 = $inifile[0][1] $hour2 = $inifile[2][0] $url2 = $inifile[2][1] While 1 $nMsg = GUIGetMsg() If ($hour1 = @HOUR & ":" & @MIN) Then ShellExecute($url1) ElseIf ($hour2 = @HOUR & ":" & @MIN) Then ShellExecute($url2) EndIf WEnd please help * I'm sorry for my bad English Share this post Link to post Share on other sites
Nine 996 Posted December 8, 2020 (edited) Here to start you up : #include <Array.au3> HotKeySet("{ESC}", _Exit) Global $inifile = IniReadSection(@ScriptDir & "\Test.ini", "MONDAY") _ArrayColInsert($inifile,2) While 1 For $i = 1 to $inifile[0][0] If Not $inifile[$i][2] And $inifile[$i][0] = @HOUR & ":" & @MIN Then $inifile[$i][2] = True ShellExecute($inifile[$i][1]) EndIf Next Sleep (1000) WEnd Func _Exit() Exit EndFunc Edited December 8, 2020 by Nine 1 ahmetpi reacted to this Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC Multiple Folders Selector GIF Animation (cached) Share this post Link to post Share on other sites
ahmetpi 0 Posted December 8, 2020 It worked. Thank you for helping 41 minutes ago, Nine said: Here to start you up : #include <Array.au3> HotKeySet("{ESC}", _Exit) Global $inifile = IniReadSection(@ScriptDir & "\Test.ini", "MONDAY") _ArrayColInsert($inifile,2) While 1 For $i = 1 to $inifile[0][0] If Not $inifile[$i][2] And $inifile[$i][0] = @HOUR & ":" & @MIN Then $inifile[$i][2] = True ShellExecute($inifile[$i][1]) EndIf Next Sleep (1000) WEnd Func _Exit() Exit EndFunc Share this post Link to post Share on other sites