Search found 83 matches
- 21 Nov 2023, 04:00
- Forum: Ask for Help (v1)
- Topic: Toggle between normal and run with UI acccess
- Replies: 11
- Views: 691
Re: Toggle between normal and run with UI acccess
There was an error in the RunAsUser function I posted earlier, which I have fixed in my post above. Sorry about that. Cheers Thanks very much, I tested this but still didn't work RunAsUser("C:\Program Files\AutoHotkey\AutoHotkeyU64.exe", A_ScriptFullPath, "/restart") , also without /restart. I just...
- 20 Nov 2023, 16:32
- Forum: Ask for Help (v1)
- Topic: Toggle between normal and run with UI acccess
- Replies: 11
- Views: 691
Re: Toggle between normal and run with UI acccess
Use this code to switch from admin to normal (copied from the v1 installer): RunAsUser(target, args:="", workdir:="") { try ShellRun(target, args, workdir) catch e Run `% args="" ? target : target " " args, `% workdir } ShellRun(prms*) { shellWindows := ComObjCreate("Shell.Application").Windows Var...
- 20 Nov 2023, 16:29
- Forum: Ask for Help (v1)
- Topic: Toggle between normal and run with UI acccess
- Replies: 11
- Views: 691
Re: Toggle between normal and run with UI acccess
Lexikos posted a ShellRun script earlier that might work. Would have a look for it. Perhaps also search for "Run as user". Thanks, I tested that, I just think it's impossible to switch back to normal at this point #SingleInstance force ^insert:: msgbox, % A_AhkPath . " " . A_IsAdmin if InStr(A_AhkP...
- 20 Nov 2023, 15:57
- Forum: Ask for Help (v1)
- Topic: Toggle between normal and run with UI acccess
- Replies: 11
- Views: 691
Re: Toggle between normal and run with UI acccess
Hello, Here is the info that you need. UAC • A_AhkPath • A_Admin Thanks very much! So I understand it's impossible to switch from Admin to normal so let's forget that. I wrote this script: #SingleInstance force ; A_IsAdmin ^insert:: msgbox, % A_AhkPath if InStr(A_AhkPath, "AutoHotkeyU64_UIA.exe") {...
- 20 Nov 2023, 13:19
- Forum: Ask for Help (v1)
- Topic: Toggle between normal and run with UI acccess
- Replies: 11
- Views: 691
Toggle between normal and run with UI acccess
Hello I'd like to have simple hotkey like #insert to be able to toggle between normal mode and UI access mode, what I could find is how to check if my script is running as admin, not sure how to check if it's running in UI access mode. And if we could also make it so that it switches between the thr...
- 22 Sep 2023, 15:55
- Forum: Ask for Help (v1)
- Topic: PowerShell 7 picks up MenuMaskKey
- Replies: 6
- Views: 506
Re: PowerShell 7 picks up MenuMaskKey
If only there was a way to change MenuMaskKey in the middle of the script!
- 14 Sep 2023, 14:22
- Forum: Ask for Help (v1)
- Topic: PowerShell 7 picks up MenuMaskKey
- Replies: 6
- Views: 506
Re: PowerShell 7 picks up MenuMaskKey
oh your PowerShell is version 5, the issue happens only on PowerShell 7.
- 14 Sep 2023, 13:59
- Forum: Ask for Help (v1)
- Topic: PowerShell 7 picks up MenuMaskKey
- Replies: 6
- Views: 506
Re: PowerShell 7 picks up MenuMaskKey
Same issue unfortunately:mikeyww wrote: ↑14 Sep 2023, 13:26Why not:
Code: Select all
#Requires AutoHotkey v1.1.33 #End::Send `n
- 14 Sep 2023, 12:56
- Forum: Ask for Help (v1)
- Topic: PowerShell 7 picks up MenuMaskKey
- Replies: 6
- Views: 506
PowerShell 7 picks up MenuMaskKey
This is my hotkey: #MenuMaskKey vkFF #end::SendInput,{LWin Up}{Numpadenter} We have an enter key on the right hand side of the keyboard, also one on the numpad section, I needed one on the left so this is what this hotkey does, it hits enter when you press the winkey and end key combo (my capslock i...
- 15 Dec 2022, 08:59
- Forum: Scripts and Functions (v1)
- Topic: Get current keyboard layout
- Replies: 12
- Views: 6307
Re: Get current keyboard layout
Hello @tuangd My main laptop which runs Windows died a week ago, I'm currently on a Linux machine and can't check this for you but you can check it yourself, if you check Spy++ which comes with Visual Studio, if I remember correctly the ahk_class WorkerW is the parent window of all windows, so it's...
- 14 Oct 2022, 09:32
- Forum: Scripts and Functions (v1)
- Topic: Get current keyboard layout
- Replies: 12
- Views: 6307
Re: Get current keyboard layout
Hello @tuangd My main laptop which runs Windows died a week ago, I'm currently on a Linux machine and can't check this for you but you can check it yourself, if you check Spy++ which comes with Visual Studio, if I remember correctly the ahk_class WorkerW is the parent window of all windows, so it's...
- 10 Oct 2022, 11:41
- Forum: Scripts and Functions (v1)
- Topic: Get current keyboard layout
- Replies: 12
- Views: 6307
Re: Get current keyboard layout
SMH! I spent so much time on this and I was wrong, my script shows the previous layout ID and only on the second try of the hotkey it will show the current layout id. One important thing I learnt: DllCalls are Case Sensitive, for example I was trying to get ThreadID for explorer.exe and it would al...
- 21 Jul 2022, 03:53
- Forum: Ask for Help (v1)
- Topic: How to call DLL from .NET Framework Interop (CLR, C#) Topic is solved
- Replies: 2
- Views: 669
Re: How to call DLL from .NET Framework Interop (CLR, C#) Topic is solved
Thanks so very much! Now I understand everything!
- 20 Jul 2022, 02:50
- Forum: Ask for Help (v1)
- Topic: How to call DLL from .NET Framework Interop (CLR, C#) Topic is solved
- Replies: 2
- Views: 669
How to call DLL from .NET Framework Interop (CLR, C#) Topic is solved
Hello I am following this project: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=4633 On VS 2019, I just created a new .Net Standard Class Library project targetting netstandard2.0 and the project and solution is called ClassLibrary1 and the csharp file is called Class1.cs and I have this C#...
- 30 Oct 2021, 09:49
- Forum: Scripts and Functions (v1)
- Topic: Get current keyboard layout
- Replies: 12
- Views: 6307
- 31 Aug 2021, 11:02
- Forum: Ask for Help (v1)
- Topic: How to hide key hold event from Microsoft Office apps
- Replies: 5
- Views: 386
Re: How to hide key hold event from Microsoft Office apps
Hello mikeyww and gregster and boiler thank you very much for your responses. I've lost count but I think this is the 5th time that I forgot that when I want to add a new feature to my script, I should first test it on a new clean script then add it to my actual script that has 1500+ lines. So I spe...
- 31 Aug 2021, 04:46
- Forum: Ask for Help (v1)
- Topic: How to hide key hold event from Microsoft Office apps
- Replies: 5
- Views: 386
How to hide key hold event from Microsoft Office apps
Hello, this simple code disables Alt key on most applications: LAlt::return And it works on Microsoft Office apps like Microsoft Word too! But there's an issue, if you hold the Alt key down, Microsoft Word will still see it! If you don't know what I mean, or you don't use Microsoft Office, I will ex...
- 12 Jul 2021, 11:09
- Forum: Ask for Help (v1)
- Topic: Unicode Hotstrings - ZWNJ not supported Topic is solved
- Replies: 2
- Views: 270
Re: Unicode Hotstrings - ZWNJ not supported Topic is solved
#Requires AutoHotkey v1.1.33.09 #NoEnv #SingleInstance Force SendMode Input SetBatchLines -1 Esc::ExitApp :*C0:a::b{Space} #InputLevel 1 q::Send {U+200C} i dont see a problem. this script already contains the ZWNJ embedded into it . i press a , i press q (to type a ZWNJ), the hotstring expands int...
- 10 Jul 2021, 16:35
- Forum: Ask for Help (v1)
- Topic: Unicode Hotstrings - ZWNJ not supported Topic is solved
- Replies: 2
- Views: 270
Unicode Hotstrings - ZWNJ not supported Topic is solved
Hello My question seems to be related to: https://www.autohotkey.com/boards/viewtopic.php?t=57577 But my question is different, my .ahk file is already "UTF-8 with BOM" and unicode characters work fine, but this unicode character called ZWNJ (Zero-Width Non-Joiner) does NOT work at all. U+200C : ZER...
- 20 May 2021, 05:41
- Forum: Ask for Help (v1)
- Topic: Programs like Virtual Machines stealing my hook
- Replies: 4
- Views: 685
Re: Programs like Virtual Machines stealing my hook
I do not use VMware, but Microsoft Remote Desktop causes similar issues when it is set to send keyboard shortcuts to the remote computer. I presume the keyboard hook is installed when the VM window is activated, and uninstalled when the window is deactivated. To work around it, you must reload the ...