Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

My compiled script wont unpause.

$
0
0

Hi, all i've wrote a script that makes shift+n create a new folder but now that i have compiled it it won unpause. 

I've tried clicking it in the taskbar and i cant unpause it here is my code.

AutoIt         
  1. AutoItSetOption("WinTitleMatchMode", 4)
  2. #include <MsgBoxConstants.au3>
  3. ;Set hot key to winkey and n and call new folder function
  4. Local $folder = "\New Folder"
  5. HotKeySet("+n", "NewFolder")
  6.  
  7. ;infinite loop
  8.   sleep(10)
  9.  
  10. ;new folder function
  11. Func NewFolder()
  12.    ;check to see if explorer is active window.
  13.     If WinActive("classname=ExploreWClass") _
  14.         Or WinActive("classname=CabinetWClass") Then
  15.          Local $hWnd = WinGetHandle("[ACTIVE]","")
  16.          Local $dirUnTrim = ControlGetText($hWnd,"", "ToolbarWindow322")
  17.          Local $dir = StringTrimLeft( $dirUnTrim, 9)
  18.          Local $initdirpath = $dir & $folder
  19.  
  20.          If FileExists($initdirpath) Then
  21.             Local $dirpathnew = StringRight($initdirpath, 2)
  22.             Local $a = StringTrimRight($dirpathnew, 1)
  23.             Local $a1 = $a + 1
  24.             Local $a2 = "(" & $a1 & ")"
  25.             ToolTip($a2)
  26.             $folder = "\New Folder" & $a2
  27.             $dirpath = $dir & $folder
  28.          Else
  29.             $dirpath = $dir & "\New Folder"
  30.          EndIf
  31.          DirCreate($dirpath)
  32.     Else
  33.         ToolTip("")
  34.     EndIf
  35.     Sleep(10)

Im not quite sure what to do and dont know why it wont let me unpause.


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>