September 1, 200520 yr what will be the autoit script to opea a particular folder (assum windows)and close it automatically after 15~20 secopen it and close after 20 sec
September 1, 200520 yr Using a For loop to open and close Windows folder twiceFor $i = 1 To 2 Run('explorer ' & @WindowsDir) Sleep(20000) WinClose('WINDOWS')Next
September 1, 200520 yr For $i = 1 To 2 Run('explorer ' & @WindowsDir & '\Fonts') Sleep(20000) WinClose('Fonts')Next
September 1, 200520 yr Author did not worked....opened fontfolder in maximized orderafter 20 sec it restored but didn't closed..
September 1, 200520 yr For $i = 1 To 2 $pid = Run('explorer ' & @WindowsDir & '\Fonts') Sleep(20000) ProcessClose($pid)NextThis might work instead - it uses the process id (pid) retrieved from the Run function, so that the window title of the fonts folder doesn't matter.Got it from the AutoIt help file > Function reference > Process management
September 1, 200520 yr Author i tried the scriptit opened the font folderthen after 20 sec.. it restored the windows (maximized to restore mode)doesn't closes the font folderits there onlyonly the size of the windows is changed..i am shockedi have attached both the screenshot (initial and final)first one is the open stagesecond one is after 20 sec is passed
September 1, 200520 yr That's weird...Btw, i tested both scripts and mine didn't work, but the one MHz provided did the job just fine...Run('explorer ' & @WindowsDir & '\Fonts')Sleep(20000)WinClose('Fonts')Maybe if you tried quotes instead? (" instead of ')?And does it work with any other folder?
September 1, 200520 yr Author still same problemopens fine but finally restored covering half windows
September 1, 200520 yr I'm sorry, i'm out of ideas... can't help you there.Try searching the AutoIt forums, perhaps you'll find an answer there. Since it's happening on your pc and not on mine, i'm guessing it's related to the way you set up Windows or AutoIt, but that's as far as my knowledge goes...http://www.autoitscript.com/forum/Good luck!
September 1, 200520 yr still same problemopens fine but finally restored covering half windows<{POST_SNAPBACK}>You have your titles set for full path to be shown. So I will use a substring option to cater for itOpt("WinTitleMatchMode", 2)For $i = 1 To 2 Run('explorer ' & @WindowsDir) Sleep(20000) WinClose('WINDOWS')NextFor $i = 1 To 2 Run('explorer ' & @WindowsDir & '\Fonts') Sleep(20000) WinClose('Fonts')Next
September 3, 200520 yr Author yessssssssssssssss,,worked fineOpt("WinTitleMatchMode", 2) Run('explorer ' & @WindowsDir & '\Fonts') Sleep(9000) WinClose('Fonts')thanks Mhz, Mojo
September 3, 200520 yr Here's an alternative script to Autoit.explorer %systemroot%\fontsping -n 10 127.0.0.1>nultaskkill /fi "windowtitle eq %systemroot%\Fonts" /im explorer.exetaskkill /fi "windowtitle eq Fonts" /im explorer.exe Edited September 3, 200520 yr by vcBlackBox
September 3, 200520 yr Author i appreciate the command i think this a command script but didn't worked in minethe command windows exit leaving font folder opened
Create an account or sign in to comment