Search found 81 matches

by mmmax
18 Jan 2024, 17:15
Forum: Ask for Help (v2)
Topic: using FileSetTime with symbolic links
Replies: 0
Views: 138

using FileSetTime with symbolic links

Is there any way to set the modified date/time of a symlink to a file using FileSetTime (or any other function for that matter)? To be clear, I'm trying to change the date modified of the symbolic link itself - not the target file. If this isn't possible, is there some way to set the date modified a...
by mmmax
18 Jan 2024, 03:32
Forum: Ask for Help (v2)
Topic: showing cmd window with command being run from ahk script?
Replies: 10
Views: 775

Re: showing cmd window with command being run from ahk script?

I simplified the script quite a bit, added checking for the selections being a file or folder, and make the symlink a junction for folders. Also added a check that the destination folder for created symlinks exists, and create it if not. Here's the final script to create symbolic links from any sele...
by mmmax
18 Jan 2024, 02:06
Forum: Ask for Help (v2)
Topic: showing cmd window with command being run from ahk script?
Replies: 10
Views: 775

Re: showing cmd window with command being run from ahk script?

If I'm understanding correctly what you are wanting to do with seeing your command in the cmd.exe window, couldn't you just echo your command to a cmd.exe, append "&&" cmd.exe /k to that, and then run your command? It won't win any style points from the judges, but something like this: Run %Comspec...
by mmmax
07 Jan 2024, 18:37
Forum: Ask for Help (v2)
Topic: showing cmd window with command being run from ahk script?
Replies: 10
Views: 775

Re: showing cmd window with command being run from ahk script?

Try: #Requires AutoHotkey v2.0 PID := 0 Run(A_ComSpec, A_Desktop, , &PID) WinWaitActive("ahk_pid " PID) ; Send 'mklink ' args.value ' "c:\users\myusername\desktop\' copiedfilename '" "' fullpathtofile'"`n' Send 'Dir C:`n' MsgBox() ExitApp It seems to work on Win 10. I understand the concept of usin...
by mmmax
06 Jan 2024, 00:30
Forum: Ask for Help (v2)
Topic: showing cmd window with command being run from ahk script?
Replies: 10
Views: 775

Re: showing cmd window with command being run from ahk script?

First off, I solved the main problem with the syntax of the mklink command ( #solution ). However, I would still really like to know how to get the cmd prompt window to show the commands sent from ahk instead of just the result of the command running . Using /k still only shows the following: Juncti...
by mmmax
03 Jan 2024, 20:26
Forum: Ask for Help (v2)
Topic: showing cmd window with command being run from ahk script?
Replies: 10
Views: 775

Re: showing cmd window with command being run from ahk script?

I only see the following when using /k, without the command passed to the cmd.exe: The syntax of the command is incorrect. Creates a symbolic link. MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbo...
by mmmax
03 Jan 2024, 07:43
Forum: Ask for Help (v2)
Topic: showing cmd window with command being run from ahk script?
Replies: 10
Views: 775

showing cmd window with command being run from ahk script?

I'm trying to get the cmd window to display with the input it receives so I can see why this isn't working. Run("C:\Windows\System32\cmd.exe /c mklink " args.value " `"c:\users\myusername\desktop\" copiedfilename "`" " fullpathtofile) How can I execute the run function for cmd.exe where the cmd wind...
by mmmax
13 Nov 2023, 04:13
Forum: Ask for Help (v2)
Topic: Why doesn't this work with certain files?
Replies: 5
Views: 440

Re: Why doesn't this work with certain files?

Hallo, here this works: #Requires AutoHotkey v2.0 $^#!t:: { FileAppend "Text" , "File'name'" ;the filename has ' symbols in it A_ClipBoard := "File'name'" Timestamp := FileGetTime(A_Clipboard , "M") MsgBox(Timestamp) } Interesting. I've never used FileAppend like that before. I'll try this solution...
by mmmax
13 Nov 2023, 04:09
Forum: Ask for Help (v2)
Topic: Why doesn't this work with certain files?
Replies: 5
Views: 440

Re: Why doesn't this work with certain files?

Not at my PC now. But the only other symbols I can think of that might've caused an issue were commas and hyphens, which were both also in the filename. I tried RegexReplace to add the ` escape for all of the aforementioned characters and assigning that path to a new variable. Still the same error. ...
by mmmax
13 Nov 2023, 00:58
Forum: Ask for Help (v2)
Topic: Why doesn't this work with certain files?
Replies: 5
Views: 440

Why doesn't this work with certain files?

Every time I try this, or parsing and using A_Loopfield in place of A_Clipboard in the FileGetTime argument: $^#!t:: { send("^c") ClipWait(1) ;waits for the clipboard to have content Timestamp := FileGetTime(A_Clipboard , "M") MsgBox(Timestamp) } If the filename has any ' symbols in it, I get this e...
by mmmax
20 Oct 2023, 15:19
Forum: Tutorials (v1)
Topic: jeeswg's Explorer tutorial
Replies: 19
Views: 38335

Re: jeeswg's Explorer tutorial

My v2 script to toggle sorting ascending/descending by either name, date modified, or size: #HotIf WinActive("ahk_exe explorer.exe|ahk_class CabinetWClass") ;███;EXPLORER█████████████████████████████████████████████ ; shift ctrl/win alt 1 - explorer sort by name +^!1:: ^#!1:: { HotKeyWait() ;columns...
by mmmax
20 Oct 2023, 05:23
Forum: Ask for Help (v2)
Topic: Some modifiers not working with Apple USB keyboard on PC
Replies: 0
Views: 265

Some modifiers not working with Apple USB keyboard on PC

I'm using an Apple USB keyboard with my PC (can't beat the feel of the keys, even with other "flat" PC keyboards I've tried). I've remapped the Windows and Alt keys as follows: #HotIf !WinActive("MacBook") LWin::LAlt LAlt::LWin RWin::RAlt RAlt::RWin #HotIf This seems to work fine/as expected when us...
by mmmax
30 Sep 2023, 07:10
Forum: Ask for Help (v2)
Topic: Detect display configuration change? Topic is solved
Replies: 19
Views: 2832

Re: Detect display configuration change? Topic is solved

IMTheNachoMan wrote:
24 Sep 2023, 08:45
@mmmax Were you able to get this to work? Mind sharing your final code?
Yes. The code in my previous post is what I'm using now.

viewtopic.php?p=540520&sid=a9b81a887045a9372e668ca84535bf53#p523250
by mmmax
30 Aug 2023, 16:52
Forum: Ask for Help (v2)
Topic: Close the "ListHotkeys" window WITHOUT quitting the ahk script that opened it? Topic is solved
Replies: 6
Views: 629

Re: Close the "ListHotkeys" window WITHOUT quitting the ahk script that opened it? Topic is solved

The help file doesn't really address this, so I have to ask: will winhide prevent windows from showing up in the alt+tab switcher or Windows task view so that, as far as the user can tell, the window is gone?
by mmmax
30 Aug 2023, 14:41
Forum: Ask for Help (v2)
Topic: Can't use mouse thumb buttons (XButton(1|2)) when viewing AHK Help file
Replies: 1
Views: 225

Can't use mouse thumb buttons (XButton(1|2)) when viewing AHK Help file

Not sure why this happens, if it might just be unique to my setup, or if this is a known issue. But googling for a solution failed, so here goes. I generally use the thumb buttons on my mouse to navigate forward and back in pretty much every application, and have ank script to support this as needed...
by mmmax
30 Aug 2023, 14:26
Forum: Ask for Help (v2)
Topic: Close the "ListHotkeys" window WITHOUT quitting the ahk script that opened it? Topic is solved
Replies: 6
Views: 629

Re: Close the "ListHotkeys" window WITHOUT quitting the ahk script that opened it? Topic is solved

#HotIf WinExist(hWnd) F4::WinActivate(), Send('!{F4}') #HotIf Ah yes... !{F4} ... so simple it's almost embarrassing that I didn't think of it. 😣🤦‍♂️ Well, now it's official: I really do need to get more sleep, instead of staying up all night tinkering with various passion projects and ahk scriptin...
by mmmax
30 Aug 2023, 03:57
Forum: Ask for Help (v2)
Topic: Close the "ListHotkeys" window WITHOUT quitting the ahk script that opened it? Topic is solved
Replies: 6
Views: 629

Close the "ListHotkeys" window WITHOUT quitting the ahk script that opened it? Topic is solved

I have tried numerous ways of closing the window that is opened by the ListHotkeys command. But so far, whether I do so by name, by ahk_id, uniqueID or PID, either with WinClose or WinKill, the AutoHotkey64.exe process that is running my ahk script is also killed. There must be some way to close the...
by mmmax
15 Aug 2023, 17:00
Forum: Scripts and Functions (v1)
Topic: Simple Window Manager (save and recall positions)
Replies: 2
Views: 4776

Re: Simple Window Manager (save and recall positions)

Does anyone still have this? The OneDrive link is dead. ☹️
Oh never mind. I'll just comment out line 9 or use a different icon.
by mmmax
09 Jul 2023, 17:58
Forum: Ask for Help (v2)
Topic: Why is LControl keypress being sent when using this hotkey?
Replies: 1
Views: 215

Why is LControl keypress being sent when using this hotkey?

Here's the ahk script I'm testing: InstallKeybdHook() KeyHistory #SingleInstance force A_HotkeyInterval := 0 SendMode("Input") #WinActivateForce SetControlDelay(1) ^!r:: ; ctrl+alt+r - reload the AHK script { msgResult := MsgBox("The script is reloading.", "", "T0.5") Reload() return } ; alt+c clear...
by mmmax
27 May 2023, 14:48
Forum: Ask for Help (v2)
Topic: Detect display configuration change? Topic is solved
Replies: 19
Views: 2832

Re: Detect display configuration change? Topic is solved

are you maybe talking about the StartTSCounter() function? I can see where I'm calling that from two different WM message functions, since sometimes the screensaver or system lock occurs independently. but even there, the first line of that function is: if not TSCounterRunning{ Maybe you could point...

Go to advanced search