Search found 2228 matches

by jeeswg
Today, 12:32
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 68

Re: ternary operator Topic is solved

This is generally quite unusual code, and might not work as expected. if (choice = "left" || choice = "right") f__move(choice) if (choice = "up" || choice = "down") f__different_function() E.g. the w hotkey triggers f__move and the line underneath the 'if' lin...
by jeeswg
Today, 12:19
Forum: Ask For Help
Topic: Zeros at end of string being cut off when sending
Replies: 11
Views: 114

Re: Zeros at end of string being cut off when sending

I actually don't know of any specific tools, or very much about hardware, I was thinking that perhaps you could retrieve some information via AutoHotkey, although I don't know what information specifically to look for. That problem sounds like it might be quite serious, so you should back up everyth...
by jeeswg
Today, 08:37
Forum: Ask For Help
Topic: process: get user name (like Task Manager)
Replies: 17
Views: 206

Re: process: get user name (like Task Manager)

AFAICS both approaches can only get the username every time if run as Admin.
by jeeswg
Today, 03:33
Forum: Ask For Help
Topic: How to get numers from string to array? Topic is solved
Replies: 3
Views: 56

Re: How to get numers from string to array? Topic is solved

This works, but if your text parts contain digits, you may need to adjust it, or do something quite different. q:: vText := "Merge task/19225-some-text into story/13402-another-text" MsgBox, % vText vText := Trim(RegExReplace(vText, "\D+", "|"), "|") MsgBox, %...
by jeeswg
Yesterday, 20:59
Forum: Ask For Help
Topic: any good autohotkey script to calculate SHA-256 ?
Replies: 4
Views: 58

Re: any good autohotkey script to calculate SHA-256 ?

Btw you can use NirSoft HashMyFiles or other utilities to generate some hashes, and compare results, to check if the functions are generating hashes correctly.

HashMyFiles handles: MD5, SHA1, CRC32, SHA-256, SHA-512, SHA-384.
by jeeswg
Yesterday, 17:54
Forum: Ask For Help
Topic: how to trigger the menu of an app in the taskbar (which has no windows and is trigger by left/right click)
Replies: 2
Views: 49

Re: how to trigger a menu of an app in the taskbar (which has no windows)

One possibility is to retrieve a menu item ID, and send it using PostMessage/SendMessage and WM_COMMAND to a window. See: Get Info from Context Menu (x64/x32 compatible) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=31971 Btw does the program accept command line parame...
by jeeswg
Yesterday, 17:25
Forum: Scripts and Functions
Topic: convert coordinates between Client/Screen/Window modes
Replies: 5
Views: 114

Re: convert coordinates between Client/Screen/Window modes

Oh you don't need them that much, next year then hehe. Yes when you mentioned it before I envisaged a function that would get the caret position according to A_CoordModeCaret, but that could also return the raw numbers retrieved from GUITHREADINFO if specified by the optional mode parameter. Or inde...
by jeeswg
Yesterday, 16:56
Forum: Scripts and Functions
Topic: convert coordinates between Client/Screen/Window modes
Replies: 5
Views: 114

Re: convert coordinates between Client/Screen/Window modes

Yes, a wise angel, I had realised that I could write the functions as two function calls. I always write functions as stand-alone or pretty much stand-alone where possible, for a quick copy-and-paste without/with few dependencies. Haha if people start making Christmas requests for functions I won't ...
by jeeswg
Yesterday, 15:52
Forum: Ask For Help
Topic: Check if any app is running as administrator Topic is solved
Replies: 5
Views: 243

Re: Check if any app is running as administrator Topic is solved

Here is an attempt to recreate A_IsAdmin via DllCall, based on the AHK source code, which only checks if AHK is admin, not external processes. q:: ;check if AHK is Admin (elevated) MsgBox, % JEE_AhkIsAdmin() return ;================================================== JEE_AhkIsAdmin() { ;see AHK sourc...
by jeeswg
Yesterday, 15:17
Forum: Ask For Help
Topic: Exit Script On Program Close
Replies: 3
Views: 54

Re: Exit Script On Program Close

Although the suggestions above seem fine, I might mention this. This detects new/closed processes. New Process Notifier - Scripts and Functions - AutoHotkey Community https://autohotkey.com/board/topic/56984-new-process-notifier/#entry358038 There are also windows event hooks for detecting window-re...
by jeeswg
Yesterday, 15:05
Forum: Ask For Help
Topic: Zeros at end of string being cut off when sending
Replies: 11
Views: 114

Re: Zeros at end of string being cut off when sending

I don't think this is necessarily relevant to your problem, but I thought I could at least mention it. Is the restarting slow after or before Windows has shutdown? q:: ;force shutdown PC in 10 minutes' time vMin := 10 vSleep := vMin * 60 Run, C:\Windows\System32\shutdown.exe -s -f -t %vSleep%,, Hide...
by jeeswg
Yesterday, 14:54
Forum: Ask For Help
Topic: any good autohotkey script to calculate SHA-256 ?
Replies: 4
Views: 58

Re: any good autohotkey script to calculate SHA-256 ?

Have a look here, various hash functions, also by jNizM: GitHub - jNizM/AHK_CNG: AHK implementation for CNG (Cryptography API: Next Generation) https://github.com/jNizM/AHK_CNG If you find more than one function/script that does the same thing, you can use benchmark tests to work out which is fastes...
by jeeswg
Yesterday, 05:17
Forum: Ask For Help
Topic: process: get user name (like Task Manager)
Replies: 17
Views: 206

Re: process: get user name (like Task Manager)

Cheers teadrinker. Btw I like your solution for preparing Unicode/ANSI buffers (the third one). q:: MsgBox, % 260 * (!!A_IsUnicode+1) MsgBox, % 260 * (A_IsUnicode?2:1) MsgBox, % 260 << !!A_IsUnicode return Btw is it SetDebugPrivilege or SeDebugPrivilege, I think it's 'Se' rather than 'Set', always c...
by jeeswg
Yesterday, 04:21
Forum: Ask For Help
Topic: process: get user name (like Task Manager)
Replies: 17
Views: 206

Re: process: get user name (like Task Manager)

Many thanks jNizM. - Very nice, it runs very fast, cf. my script, which is perhaps slowed down by using a WMI object. - Like my script, you need to run as Admin, to see the usernames when it's not your username, otherwise you get a blank. (AHK Process Explorer shows blanks, this script shows 0s.) - ...
by jeeswg
Yesterday, 04:02
Forum: Ask For Help
Topic: Ternary operator, how do I open it ? Topic is solved
Replies: 5
Views: 75

Re: Ternary operator, how do I open it ? Topic is solved

Your two examples and iseahound's example expressed in different ways. ;these two are equivalent q:: varA := (varA = 0) ? 1 : 0 MsgBox, % varA return w:: if (varA = 0) varA := 1 else varA := 0 MsgBox, % varA return ;================================================== ;these two are equivalent e:: var...
by jeeswg
18 Oct 2017, 21:11
Forum: Ask For Help
Topic: numbers in X.Xk back to numerical numbers Topic is solved
Replies: 5
Views: 66

Re: numbers in X.Xk back to numberical numbers Topic is solved

I've had a go at some RegEx for this, although to write '130.332k' would seem very unusual, in case you have a link or a copy of some original text. Perhaps it's the European style of writing numbers, where '.' means ','? But then you have '10.1k' example which would contradict this. Anyhow, I would...
by jeeswg
18 Oct 2017, 21:01
Forum: Ask For Help
Topic: Detect volume changes (commercials) in streaming audio/video?
Replies: 5
Views: 67

Re: Detect volume changes (commercials) in streaming audio/video?

I use this to check if the system is outputting audio. q:: ;check if current audio output is silent or not vAudioMeter := VA_GetAudioMeter() VA_IAudioMeterInformation_GetPeakValue(vAudioMeter, vPeakValue) MsgBox, % vPeakValue return Links: Vista Audio Control Functions - Scripts and Functions - Auto...
by jeeswg
18 Oct 2017, 20:49
Forum: Ask For Help
Topic: Check if any app is running as administrator Topic is solved
Replies: 5
Views: 243

Re: Check if any app is running as administrator Topic is solved

- This function is great, however, if AHK is not admin, and the window is admin, it throws an exception. - For this reason I've created a modified version of the function that returns blanks on failure, which suggests, but doesn't guarantee, that the window is admin. - Are there any other approaches...
by jeeswg
18 Oct 2017, 20:24
Forum: Ask For Help
Topic: Make Alt Gr key on UK keyboard function as second Alt key?
Replies: 3
Views: 34

Re: Make Alt Gr key on UK keyboard function as second Alt key?

My key says 'AltGr' and when I press it, AutoHotkey's key history records LControl and RAlt. I've been able to use hotkeys such as <^>!a and RAlt & a. That's the extent of my AltGr knowledge pretty much.

by jeeswg
18 Oct 2017, 20:14
Forum: Ask For Help
Topic: external process: get working directory (current directory)
Replies: 4
Views: 76

Re: external process: get working directory (current directory)

Haha you're here to practise your English, classic. Hmm, the comment about system processes, reminded me, I wanted a way to get the user name for a process. I've started a new thread here: process: get user name (like Task Manager) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f...

Go to advanced search