Search found 12 matches

by stax76
04 Jan 2024, 03:05
Forum: Wish List
Topic: [Feature Request] Command line parameter to execute code without script file
Replies: 6
Views: 835

[Feature Request] Command line parameter to execute code without script file

PowerShell and all other shells I know have a command line parameter to run code without a script file. Command line power users use this feature frequently. It would be a useful feature if AutoHotkey would support it too. Desktop> bash -c 'echo foo bar' foo bar Desktop> powershell -command echo foo...
by stax76
25 Nov 2023, 21:05
Forum: Ask for Help (v2)
Topic: Fast and reliable way to open new tab in File Explorer
Replies: 3
Views: 489

Re: Fast and reliable way to open new tab in File Explorer

It does not work on my system, it always creates new windows. I tried increasing the sleep time, but did not help.
by stax76
22 Nov 2023, 00:18
Forum: Ask for Help (v2)
Topic: Fast and reliable way to open new tab in File Explorer
Replies: 3
Views: 489

Fast and reliable way to open new tab in File Explorer

Before File Explorer had tabs, I opened folders with Flow Launcher and the Flow Launcher Favorites plugin and command line. This created a new explorer window for every folder. Now that explorer has tabs, I want to open new folders in new tabs instead of new windows. It's not supported by explorer, ...
by stax76
21 Nov 2023, 22:30
Forum: Ask for Help (v2)
Topic: How to use/call the GetMonitorInfo Win32 function
Replies: 5
Views: 416

Re: How to use/call the GetMonitorInfo Win32 function

While I tried to port the code, I found code in the docs, that does exactly what I want without the need to access Win32 with DllCall, problem solved.
by stax76
21 Nov 2023, 20:40
Forum: Ask for Help (v2)
Topic: How to use/call the GetMonitorInfo Win32 function
Replies: 5
Views: 416

How to use/call the GetMonitorInfo Win32 function

I'm trying to convert v1 code to v2, what the code does is centering the active window on the screen, this is the v1 code: CenterActiveWindow() { ; Get the window handle from de active window. winHandle := WinExist("A") VarSetCapacity(monitorInfo, 40) NumPut(40, monitorInfo) ; Get the current monito...
by stax76
21 Nov 2023, 11:28
Forum: Ask for Help (v2)
Topic: How can I use command line parameters in a v2 script?
Replies: 2
Views: 304

How can I use command line parameters in a v2 script?

How translates the code below from v1 to v2?

Code: Select all

Run explorer.exe %1%

Send {Raw}%1%
Error message:
Warning: This variable appears to never be assigned a value.

Specifically: global explorer

▶ 002: Run(explorer.exe %1%)
003: Exit

For more details, read the documentation for #Warn.
by stax76
26 Aug 2022, 08:30
Forum: Scripts and Functions (v1)
Topic: Execute Run command with refreshed environment
Replies: 0
Views: 335

Execute Run command with refreshed environment

I wanted to do a simple task, start 'Windows Terminal' via shortcut. 'Run wt' did it, but there was a problem. The Path environment variable and all other environment variables in the wt process and any other process started via Run weren't up-to-date, my script is started at system startup, at this...
by stax76
22 Jan 2022, 02:23
Forum: Ask for Help (v1)
Topic: How to log activated windows?
Replies: 6
Views: 537

Re: How to log activated windows?

@mikeyww Thanks for helping. I was not able to fix the issue. Meanwhile, I recorded the screen with OBS, and this showed the title bar changes color a few milliseconds indicating that the application loses focus shortly, but there didn't appear another window on screen or in the taskbar, at least no...
by stax76
20 Jan 2022, 10:28
Forum: Ask for Help (v1)
Topic: How to log activated windows?
Replies: 6
Views: 537

How to log activated windows?

I've a very annoying defect on my system, sometimes there is a window popping up, and I don't know what it is because it can only be seen for a few milliseconds, I don't see much more than the blinking of the title bar of the currently active application. First I thought it was Anki because I use th...

Go to advanced search