Carrotlolz

My compiled script wont unpause.

4 posts in this topic

#1 ·  Posted (edited)

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.

AutoItSetOption("WinTitleMatchMode", 4)
#include <MsgBoxConstants.au3>
;Set hot key to winkey and n and call new folder function
Local $folder = "\New Folder"
HotKeySet("+n", "NewFolder")

;infinite loop
While 1
  sleep(10)
WEnd

;new folder function
Func NewFolder()
   ;check to see if explorer is active window.
    If WinActive("classname=ExploreWClass") _
        Or WinActive("classname=CabinetWClass") Then
         Local $hWnd = WinGetHandle("[ACTIVE]","")
         Local $dirUnTrim = ControlGetText($hWnd,"", "ToolbarWindow322")
         Local $dir = StringTrimLeft( $dirUnTrim, 9)
         Local $initdirpath = $dir & $folder

         If FileExists($initdirpath) Then
            Local $dirpathnew = StringRight($initdirpath, 2)
            Local $a = StringTrimRight($dirpathnew, 1)
            Local $a1 = $a + 1
            Local $a2 = "(" & $a1 & ")"
            ToolTip($a2)
            $folder = "\New Folder" & $a2
            $dirpath = $dir & $folder
         Else
            $dirpath = $dir & "\New Folder"
         EndIf
         DirCreate($dirpath)
    Else
        ToolTip("")
    EndIf
    Sleep(10)
EndFunc

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

Edited by Carrotlolz

Share this post


Link to post
Share on other sites



oh right sorry when you click it in the task bar it shows a little icon where it flashes between a red x and the icon the when you right click the icon it has a little dropdown menu and it says unpause script but it wont let me click it.

post-81806-0-70471800-1425933403.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What you are after, is a resume ability, that I don't think AutoIt has ever had.

Your only option in this instance, is Exit.

If you want Pause and Resume, you need to code them yourself.

That said, you could probably benefit from checking out my New Folders program.

Or if all you want is to create a new folder whenever you click SHIFT+N (or somesuch) (I use CTRL+ALT+F)

then just create a shortcut to your program and assign the appropriate Hotkey there (it can be coded for too).

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now