Search found 122 matches

by eagerahk
10 Feb 2023, 03:22
Forum: Scripts and Functions (v1)
Topic: DesktopIcons() : Hide / Show Desktop Icons
Replies: 27
Views: 9712

Re: DesktopIcons() : Hide / Show Desktop Icons

Hi, SKAN

Thank you for implementing such a nice piece of code!! :bravo:
by eagerahk
28 Jan 2023, 18:59
Forum: Ask for Help (v1)
Topic: To invoke explorer to bring up a folder with cursor stay at certain place Topic is solved
Replies: 2
Views: 291

Re: To invoke explorer to bring up a folder with cursor stay at certain place Topic is solved

Sorry, I finally figure it out.

Code: Select all

xx := "D:\xxx\file2.xls"
cmd := "explorer /select," xx
Run, %cmd%
The code works.
by eagerahk
28 Jan 2023, 17:46
Forum: Ask for Help (v1)
Topic: To invoke explorer to bring up a folder with cursor stay at certain place Topic is solved
Replies: 2
Views: 291

To invoke explorer to bring up a folder with cursor stay at certain place Topic is solved

If a folder, D:\xxx has 3 files, file1.doc, file2.xls, file3.ppt, the following code tries to invoke explorer to bring up the folder with the cursor stay at file2.xls? [Mod edit: Removed non-working ChatGPT code.] I tried the code, it brought up the folder, but the cursor did not stay where I wished...
by eagerahk
28 Jan 2023, 17:39
Forum: Ask for Help (v1)
Topic: Using AI ChatGPT to generate AHK code
Replies: 2
Views: 680

Re: Using AI ChatGPT to generate AHK code

I am sorry..Please close the subject..Thanks
by eagerahk
28 Jan 2023, 17:32
Forum: Ask for Help (v1)
Topic: Using AI ChatGPT to generate AHK code
Replies: 2
Views: 680

Using AI ChatGPT to generate AHK code

Hi, I submit this question to AI ChatGPT https://openai.com/blog/chatgpt/: If a folder, D:\xxx has 3 files, file1.doc, file2.xls, file3.ppt, how can I write an Autohotkey script to invoke explorer to bring up the folder with the cursor stay at file2.xls? Here is an answer from AI [Mod edit: Removed ...
by eagerahk
25 Dec 2022, 03:35
Forum: Ask for Help (v1)
Topic: WinActivate ahkid not fully workable in Win7 (but OK in Win10) Topic is solved
Replies: 2
Views: 260

WinActivate ahkid not fully workable in Win7 (but OK in Win10) Topic is solved

I am using both Win7 and Win10, the following code fully works in Win10, but failed in Win7. Does anyone know how to fix it? I am running AutoHotkey v1.1.36.02. Thanks a lot! f6:: WinGet, pid0, PID, A run notepad sleep 100 WinMaximize, A sleep 100 WinActivate, ahk_pid %pid0% return A. Suppose any fo...
by eagerahk
07 Dec 2022, 08:25
Forum: Ask for Help (v1)
Topic: When shall A_GuiWidth get updated? Topic is solved
Replies: 2
Views: 240

When shall A_GuiWidth get updated? Topic is solved

I assumed that A_GuiWidth and A_GuiHeight both get updated right after Gui, show , but that may not be the case: #SingleInstance force gui, font, s30 gui, add, button,,test gui show, x300 y300 w250 h200 msgbox % A_GuiWidth ";" A_GuiHeight return The above msgbox displays blank value for A_GuiWidth a...
by eagerahk
05 Dec 2022, 10:27
Forum: Ask for Help (v1)
Topic: GuiSize question to color a Button in Msgbox Topic is solved
Replies: 6
Views: 359

Re: GuiSize question to color a Button in Msgbox Topic is solved

Thanks mikeyww again, here is the revised code Gui,Color,Yellow Gui, Font, s20, Times New Roman Gui,Add,Text, x25 y20 w300 h30 BackgroundTrans ,Line 1 Gui,Add,Text, x25 y50 w300 h30 BackgroundTrans ,Line 2 Gui,Add,Text, x25 y80 w300 h30 BackgroundTrans ,Line 3 Gui, Font, s26 Gui,Add,Progress, x90 y1...
by eagerahk
05 Dec 2022, 09:57
Forum: Ask for Help (v1)
Topic: GuiSize question to color a Button in Msgbox Topic is solved
Replies: 6
Views: 359

Re: GuiSize question to color a Button in Msgbox Topic is solved

Thanks, mikeyww.
I retry %Progress1%, and the GuiSize still not work as expected.
by eagerahk
05 Dec 2022, 09:30
Forum: Ask for Help (v1)
Topic: GuiSize question to color a Button in Msgbox Topic is solved
Replies: 6
Views: 359

GuiSize question to color a Button in Msgbox Topic is solved

Based on Garry's post https://www.autohotkey.com/boards/viewtopic.php?t=29591#p139568, I slightly modified the code to Gui,Color,Yellow Gui, Font, s20, Times New Roman Gui,Add,Text, x25 y20 w300 h30 BackgroundTrans ,Line 1 Gui,Add,Text, x25 y50 w300 h30 BackgroundTrans ,Line 2 Gui,Add,Text, x25 y80 ...
by eagerahk
05 Aug 2021, 20:04
Forum: Ask for Help (v1)
Topic: Detecting multiple instances when using WinWait or WinActivate
Replies: 11
Views: 913

Re: Detecting multiple instances when using WinWait or WinActivate

Example 4. Four PIDs working code run "iexplore" "d:\sample1.gif",,,pid1 loop 10 {sleep 100 WinActivate, ahk_pid %pid1% if not errorlevel break } sleep 100 WinActivate, ahk_pid %pid1% sleep 100 send #{Left} sleep 100 run "iexplore" "d:\sample2.gif",,,pid2 loop 10 {sleep 100 WinActivate, ahk_pid %pid...
by eagerahk
05 Aug 2021, 19:56
Forum: Ask for Help (v1)
Topic: Detecting multiple instances when using WinWait or WinActivate
Replies: 11
Views: 913

Re: Detecting multiple instances when using WinWait or WinActivate

Thank you, Rohwedder, for your endeavor! I tried here and stuck at the first loop where I always have ClassNN = "" Loop { ControlGetFocus, ClassNN Sleep, 100 } Until, ClassNN = _WwG1 Perhaps this helps: https://autohotkey.com/board/topic/76227-resolved-run-does-not-retrieve-the-pid/ Yes, it does hel...
by eagerahk
05 Aug 2021, 01:27
Forum: Ask for Help (v1)
Topic: Detecting multiple instances when using WinWait or WinActivate
Replies: 11
Views: 913

Re: Detecting multiple instances when using WinWait or WinActivate

In the following code, sample1 and sample2 are any free sample animated GIFs. If we do not comment out WinWaits, we shall never see the window of Hello, World . Do I misunderstand anything here for the purpose of WinWait? Thanks!! run "iexplore" "d:\sample1.gif",,,pid1 WinWait, ahk_pid %pid1% Sleep,...
by eagerahk
04 Aug 2021, 02:48
Forum: Ask for Help (v1)
Topic: Detecting multiple instances when using WinWait or WinActivate
Replies: 11
Views: 913

Re: Detecting multiple instances when using WinWait or WinActivate

Thank you very much. Rohwedder. I used your code and it works for Word 2007 here as well. Examining your code and mine, there are two important differences: 1. Run .... /t,,,pid1 ←←my code did not have /t 2. your code has Sleep, 2000 after WinWait , this is very critical. Without it the whole thing ...
by eagerahk
03 Aug 2021, 19:33
Forum: Ask for Help (v1)
Topic: Detecting multiple instances when using WinWait or WinActivate
Replies: 11
Views: 913

Re: Detecting multiple instances when using WinWait or WinActivate

Thank you for reminding me of PID . I tried the following code, but could not make it work: #SingleInstance, force run "C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE",,,pid1 WinWait, ahk_pid %pid1% run "C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE",,,pid2 WinWait, ahk_...
by eagerahk
02 Aug 2021, 23:55
Forum: Ask for Help (v1)
Topic: Detecting multiple instances when using WinWait or WinActivate
Replies: 11
Views: 913

Detecting multiple instances when using WinWait or WinActivate

How can we detecting multiple instances of any application when using WinWait or WinActivate? The following code does not work for the second instance. Run, Notepad WinWait, ahk_class Notepad Run, Notepad WinWait, ahk_class Notepad If somehow there is no way to detect multiple instances, may be I ca...
by eagerahk
08 Jul 2021, 23:33
Forum: Ask for Help (v1)
Topic: Hotkey Not Working When Using Alt (!) Function
Replies: 10
Views: 2302

Re: Hotkey Not Working When Using Alt (!) Function

Code: Select all

!NumpadAdd::
msgbox  !NumpadAdd is just activated
return 
!NumpadSub::
msgbox  !NumpadSub is just activated
return 

Go to advanced search