Search found 299 matches

by RickC
19 Jan 2024, 09:12
Forum: Ask for Help (v1)
Topic: FormatTime not working as expected Topic is solved
Replies: 2
Views: 129

Re: FormatTime not working as expected Topic is solved

ROFL... such an elementary mistake. Thanks, @JoeWinograd , for the advice.
by RickC
18 Jan 2024, 22:17
Forum: Ask for Help (v1)
Topic: ahk how to ping another computer in same network Topic is solved
Replies: 5
Views: 288

Re: ahk how to ping another computer in same network Topic is solved

The code worked for me when I matched the variable in line 1 to the MsgBox output variable in line 2... and I didn't have to 'quote' the IP address.
by RickC
18 Jan 2024, 22:00
Forum: Ask for Help (v1)
Topic: FormatTime not working as expected Topic is solved
Replies: 2
Views: 129

FormatTime not working as expected Topic is solved

FormatTime, TimeString,, dd-MMM-yyyy ^Insert:: SendInput, %TimeString% Why does this snippet (the first 2 lines of a much longer 'helper' script) not insert the current date, only the last date that the device was rebooted? I've gone through the v1 documentation but cannot see what I am missing for...
by RickC
03 Jan 2023, 09:52
Forum: Ask for Help (v1)
Topic: Please help me out with good learning resources for autohotkey
Replies: 6
Views: 585

Re: Please help me out with good learning resources for autohotkey

I would also check out Jack's AutoHotkey Blog - https://jacks-autohotkey-blog.com/ IMO he spends a lot of time explaining code and concepts with multiple examples. I even bought his books... all of them. :) Sadly he's stopped adding new blog articles since about June 2021; but there's a huge amount ...
by RickC
20 Dec 2022, 10:05
Forum: Ask for Help (v1)
Topic: Get currently connected network name
Replies: 22
Views: 6805

Re: Get currently connected network name

Code: Select all

Run, powershell -NoExit -Command (get-netconnectionprofile).name
or

Code: Select all

Run, powershell -NoExit -Command (gip).NetProfile.Name
(slightly slower)
by RickC
30 Nov 2022, 09:01
Forum: Forum Issues
Topic: Recent Forum Issues - August 2021
Replies: 239
Views: 293562

Re: Recent Forum Issues - August 2021

Considering this thread's post title and how - more than a year later - it's mostly off-topic... isn't it time to retire it gracefully?
by RickC
29 Oct 2022, 06:01
Forum: Ask for Help (v1)
Topic: usb control
Replies: 3
Views: 410

Re: usb control

Use NIr Sofer's small, free, portable USBDeview to script via commandline. You can use device name, description, VID\PID or serial no. to enable/disable USB devices. See https://www.nirsoft.net/utils/usb_devices_view.html for more info and read the commandline examples. For example: USBDeview.exe /d...
by RickC
16 Aug 2022, 08:31
Forum: Ask for Help (v1)
Topic: Send (and alternatives) results in 'Send' itself being included Topic is solved
Replies: 3
Views: 415

Re: Send (and alternatives) results in 'Send' itself being included Topic is solved

Thanks, BoBo , for the explanation. Silly of me - you're right of course. I just wasn't thinking. I changed the line to the following and it now works perfectly. :*:---::_______________________________________________________________ ; Send 63 consecutive underscore characters to form horizontal lin...
by RickC
16 Aug 2022, 06:39
Forum: Ask for Help (v1)
Topic: Send (and alternatives) results in 'Send' itself being included Topic is solved
Replies: 3
Views: 415

Send (and alternatives) results in 'Send' itself being included Topic is solved

I used to use the following to create a horizontal line in a forum post: :*:---::[hr][/hr] ; Send HTML tags for horizontal line by presssing 3 hyphens However, whilst effective, the horizontal line was very faint. I found that using consecutive underline characters created a thicker horizontal line....
by RickC
14 Jul 2022, 21:59
Forum: Ask for Help (v1)
Topic: Two questions about creating text files Topic is solved
Replies: 2
Views: 482

Re: Two questions about creating text files Topic is solved

I haven't tested either yet but your replies to both of my questions make perfect sense. That's what I meant by 'brainfog'.

EDIT: Worked immediately... after hours chasing my own tail. So easy when it's pointed out to you... Thank you @boiler !
by RickC
14 Jul 2022, 21:41
Forum: Ask for Help (v1)
Topic: Two questions about creating text files Topic is solved
Replies: 2
Views: 482

Two questions about creating text files Topic is solved

Q1. Is it better to a) compose/build text using the Windows clipboard before dumping to a text file or b) is the use of FileAppend a better/preferred method? Pros/Cons? Q2. How to use a 'newline' command with clipboard contents? This works perfectly: clipboard := "my text" ; Give the clipboard entir...
by RickC
11 Jun 2022, 10:04
Forum: Ask for Help (v1)
Topic: How to block Microsoft Edge from opening - except when I click its EXE or LNK shortcut? Topic is solved
Replies: 5
Views: 928

Re: How to block Microsoft Edge from opening - except when I click its EXE or LNK shortcut? Topic is solved

By default Microsoft Edge runs some automatic actions to give the impression that it loads quickly. These automatic actions pre-load Edge processes and prepare the Start tab in the background, hidden... so you need to stop them being called. Save the following as a REG file: Windows Registry Editor ...
by RickC
12 May 2022, 04:41
Forum: Ask for Help (v1)
Topic: powershell gwmi equivalent or syntax.
Replies: 7
Views: 791

Re: powershell gwmi equivalent or syntax.

You can still use PowerShell commands or scripts wrapped in AHK . For example: Run, powershell -NoExit -Command (Get-CimInstance -class Win32_Battery).BatteryStatus https://i.postimg.cc/j28yVbnt/run-powershell-command-wrapped-in-ahk.png A result of 2 (as in the screenshot) shows the device is runnin...
by RickC
12 May 2022, 03:51
Forum: Ask for Help (v1)
Topic: French keyboard letter ä
Replies: 5
Views: 520

Re: French keyboard letter ä

Almost the same as garry 's code but I prefer to use a hotstring replacement rather than a hotkey: :*:aaa::ä All this means is "wait until 3 consecutive a letters are typed (i.e. aaa ) then immediately overtype them with the diacritic letter ä ". Choose another hotstring for text replacement if you ...
by RickC
11 May 2022, 22:17
Forum: Ask for Help (v1)
Topic: How to execute a Powershell (.ps1) file in Autohotkey? Topic is solved
Replies: 4
Views: 5395

Re: How to execute a Powershell (.ps1) file in Autohotkey? Topic is solved

Run, powershell.exe C:\Users\user1\PoweShell\Duplicate Selected Files.ps1 Running the above example just opens the blue powershell CMD window and it quickly flashes, the script does not run. Running the below example opens the blue powershell CMD window and keeps it open, the script does not run. R...
by RickC
04 May 2022, 20:37
Forum: Ask for Help (v1)
Topic: Can we change the file name with a hotkey?
Replies: 5
Views: 1435

Re: Can we change the file name with a hotkey?

@RickC thanks for the comment. Which part of your script triggers the "Rename" setting for the file (ie. right click > Rename)? My fault... I should have explained that I use CTRL+C to copy a filename within the folder to the clipboard, go up a level to the folder itself and long-press on the folde...
by RickC
04 May 2022, 20:26
Forum: Ask for Help (v1)
Topic: How to Get Number of Pages of Open Foxit PDF Document Topic is solved
Replies: 18
Views: 2412

Re: How to Get Number of Pages of Open Foxit PDF Document Topic is solved

I haven't yet found a way using AHK but I've been using a PowerShell script with a free commandline utility called PDFINFO to find the page count of PDF files in a folder. For example, scanning a folder of 60 PDF files took just 3 seconds to return a list of each PDF file with their page count. PDFI...
by RickC
04 May 2022, 18:15
Forum: Ask for Help (v1)
Topic: Can we change the file name with a hotkey?
Replies: 5
Views: 1435

Re: Can we change the file name with a hotkey?

I use Windows key + a together to change foldernames. For example: #a:: clipboard := clipboard If WinActive("C:\Users\user\To Do") ; Only carry out filename changes in this folder open in File Explorer clipboard := clipboard " <add any additional text here>" ;MsgBox %clipboard% Send, ^v ; Paste the ...

Go to advanced search