ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Post New Requests Here

Adapt emptytxtfile.ahk to windows 8.1

<< < (8/9) > >>

i will try and don't give in because a problem well stated is a problem half-solved (charles kettering)

At the present moment i am updating to windows 10 and seems to take a while. Meanwhile i will try the new code anyway.

It seems i am lost.
Could you please post all the new code again (complete script) to try ?
I am not able to find the part of the code to be replaced.

Best regards

I started off with the script you originally posted, and implemented the suggestion by MilesAhead using "#IfWinExists ahk_class ... " instead of "#if WinExists(...)", though that doesn't matter much (tested both, worked just fine)
Then I tried to find the reason it didn't get the value for the DesPath variable, trying to understand how it got it in the first place. Then used the AHK AutoIt3 Window Spy tool that comes with the AHK installer to find the control-name for the current Path of the Explorer window, parsed it to remove the Address: prefix, and 'et voila', working 8).
BTW, I've compiled the script into a .exe, and it works both compiled for x86 (32 bit Unicode) or x64 (64 bit Unicode). I think the Unicode compilation is required for current Windows versions, to enable it working for *any* Language-locale. Doesn't need to be Run As Administrator (though I still have UAC enabled).

This is my current script: (Didn't do any nice indenting or comments :-[, only added the current path to the "File Name" first line of the list)

--- Code: Autohotkey ---#SingleInstance Force         #ifWinActive ahk_class CabinetWClass    {      #y::      Gui, Destroy      WinGet, WinID, ID, A      Gui, +LastFound      HWND := WinExist()      ControlGetText, DesPath, ToolbarWindow323, ahk_id %WinID%      StringMid,DesPath,DesPath,Instr(DesPath,": ") + 2      Gui, Add, ListView, r10 NoSort vChosenName h300 w400, File Name (Path: %DesPath%)         For A,B in {1:"Instrucciones.txt",2:"Instalar en mv.txt", 3:"Es mal portable. Instalar como no portable.txt", 4:"Instalado como portable.txt", 5:"Instalar cuando se pueda.txt", 6:"ReciboLLamadaAlas.proponer fecha hora.txt", 7:"Ver pantallazos.proponer fecha hora.txt", 8:"Ver grabaciones de la fecha.proponer fecha sistema.txt", 9:"password   pegado del portapapeles.txt", 10:"Avira detecta virus. en parte a especificar.txt", 11:"File11.txt", 12:"Es un juego.txt", 13:"Es para entorno MAC Apple.txt", 14:"Tambien tienen versiones de pago.txt", 15:"No es buen portable.Instalado como portable.txt",16:"No funcione en xp. es para w7 o sup.txt", 17:"Nuevo Notepad++ Document.txt",18:"Script AutoIt.au3",19:"Script Autohotkey.ahk", 20:"es un trial de prueba.txt", 21:"ae.fecha.txt",22:"File22.txt", 23:"File23.txt", 24:"File24.txt",25:"File25.txt",26:"File26.txt"}        LV_Add("",B)        Gui, Add, Button, gChoose, Submit      Gui, Show, h340 w420, Choose File Name      Return    }         Choose:    ControlGet, List, List, Selected, SysListView321, ahk_id %HWND%    Gui, Destroy    Loop, Parse, List, `n    {       If !FileExist(DesPath "\" A_LoopField)          FileAppend,, %DesPath%\%A_LoopField%    }    Return

parsed it to remove the Address: prefix, and 'et voila', working
-Ath (August 14, 2015, 08:12 AM)
--- End quote ---

I forgot about that.  I had to do the same thing in FolderCache for Vista and later.  I think I used StringBetween() to get the string after "Adress:" up to the end of line.

At the present moment i have problems with Microsoft as usual.
All my attempts to go to windows 10 fails until the moment under different messages . Like error 80007003 and others.
After try all the usual solutions i have arrived to the microsoft forums and waiting.


But i can try the new code in windows 8.1 right now and comment

Best Regards


[0] Message Index

[#] Next page

[*] Previous page

Go to full version