I use a lot this script in windows 7
but when try in windows 8.1 the folders submitted are not created.
How can I vary the script to make functional ?
Best Regards
Adapt a script for windows 8.1 and 10
-
- Posts: 1472
- Joined: 05 May 2018, 12:23
Re: Adapt a script for windows 8.1 and 10
here is the OP's code for those not interested in downloading
try running as admin
Code: Select all
#SingleInstance Force
; #if winactive("ahk_class CabinetWClass") pruebo con la alternativa de más abajo
#ifWinActive ahk_class CabinetWClass
{
#z::
Gui, Destroy
WinGet, WinID, ID, A
Gui, +LastFound
HWND := WinExist()
ControlGetText, DesPath, Edit1, ahk_id %WinID%
Gui, Add, ListView, r10 NoSort vChosenName h300 w400, Folder Name
For A,B in {1:"Prg1",2:"Prg2", 3:"Prg3", 4:"Prg4", 5:"Prg5", 6:"%yyyy%", 7:"%MMyyyy%", 8:"Ver.hh.mm", 9:"password", 10:"Avira", 11:"Folder11", 12:"Es un juego", 13:"MACApple", 14:"pago", 15:"portable",16:"Nofunc", 17:"Nuevo",18:"Script",19:"Autohotkey", 20:"trial", 21:"Folder21",22:"INFO", 23:"Foros", 24:"Videos",25:"Formación",26:"Android", 27:"Windows", 28:"Consulta"}
LV_Add("",B)
Gui, Add, Button, gChoose, Submit
Gui, Show, h340 w420, Choose Folder Name
Return
}
Choose:
ControlGet, List, List, Selected, SysListView321, ahk_id %HWND%
Gui, Destroy
Loop, Parse, List, `n
{
If !FileExist(DesPath "\" A_LoopField)
FileCreateDir, %DesPath%\%A_LoopField%
}
Return
Re: Adapt a script for windows 8.1 and 10
Thanks AHKStudent.
I am the only administrator in my system.
I suppose so.
How can I assure this ?.
I am the only administrator in my system.
I suppose so.
How can I assure this ?.
Re: Adapt a script for windows 8.1 and 10
Running as administrator don't give good result.
Sorry.
Sorry.
Re: Adapt a script for windows 8.1 and 10
For compatibility with one of my applications I have disabled the UAC service. May be this in relation ?
How can I test all this simply ?
Best Regards
How can I test all this simply ?
Best Regards
Re: Adapt a script for windows 8.1 and 10
Perhaps the class is different (can't be bothered to check it)
Code: Select all
SetTitleMatchMode, RegEx
#IfWinactive ahk_class (CabinetWClass|ExploreWClass)
Re: Adapt a script for windows 8.1 and 10
Running to try.
Re: Adapt a script for windows 8.1 and 10
Sorry, don't go well.
Re: Adapt a script for windows 8.1 and 10
Can I vary the script and don't have problem with UAC or security issues ?
Is this possible with AHK ?
Is this possible with AHK ?
Re: Adapt a script for windows 8.1 and 10
You do get the GUI to create your folders? If you don't the class is still wrong to fix that first. If you do get the Gui check the errorlevel after the FileCreateDir command to see what it says (perhaps the dirs are created but you don't see them unless you refresh your explorer) - perhaps the paths are wrong. Try this
Code: Select all
If !FileExist(DesPath "\" A_LoopField)
{
FileCreateDir, %DesPath%\%A_LoopField%
MsgBox % "folder: " DesPath "\" A_LoopField "nResult: " ErrorLevel " and " A_LastError
}
Re: Adapt a script for windows 8.1 and 10
- This line may be a problem:
ControlGetText, DesPath, Edit1, ahk_id %WinID%
- The line does not work for me on Windows 7. Use MsgBox, % DesPath to check whether any text was retrieved.
- Check for examples using ComObjCreate("Shell.Application").Windows and Document.Folder.Self.Path to get the folder path for an Explorer window.
ControlGetText, DesPath, Edit1, ahk_id %WinID%
- The line does not work for me on Windows 7. Use MsgBox, % DesPath to check whether any text was retrieved.
- Check for examples using ComObjCreate("Shell.Application").Windows and Document.Folder.Self.Path to get the folder path for an Explorer window.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Adapt a script for windows 8.1 and 10
Running to try.
Best Regards
Best Regards
Re: Adapt a script for windows 8.1 and 10
Why do you suppose so ?
How can I test that exactly ?
alternative code ?
Best Regards
How can I test that exactly ?
alternative code ?
Best Regards
Re: Adapt a script for windows 8.1 and 10
I try with no results .
An alternative script ?
I need to create folders inside an opened one in explorer. I may choose the folders to be created from a list of names (one or more selecting with shift or control keys).
Best Regards
An alternative script ?
I need to create folders inside an opened one in explorer. I may choose the folders to be created from a list of names (one or more selecting with shift or control keys).
Best Regards
Who is online
Users browsing this forum: AlFlo and 226 guests