Hi Everyone! Been away from scripting for a bit and am a bit rusty.
I was trying to get downloaded image filenames to increment by one. I was hoping to be able to check the last filename and continue from there if the program was closed and reopened again.
AutoIt
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $biolister = GUICreate("Form1", 125, 97, 192, 124) GUISetBkColor(0x99B4D1) $start = GUICtrlCreateButton("Start", 8, 40, 41, 33) GUICtrlSetBkColor(-1, 0x00FFFF) $stop = GUICtrlCreateButton("Stop", 72, 40, 41, 33) GUICtrlSetBkColor(-1, 0xFF0000) $Bio = GUICtrlCreateLabel("Bio Lister", 24, 8, 80, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $filename = 0 $sImgDir = "C:\filepathname\"&$filename&".jpg" $sImgUrl = "http://lorempixel.com/400/200" $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $stop Exit case $start InetGet($sImgUrl, $simgdir, 1, 0) if fileexists( $simgdir & $filename) then $filename + 1 EndSwitch WEnd