Search found 123 matches
- 10 May 2024, 07:21
- Forum: Ask for Help (v2)
- Topic: ahk documentation questions
- Replies: 1
- Views: 127
ahk documentation questions
hello. this topic will include some questions I have regarding ahk documentation. thanks in advance for all help. You can define a custom combination of two (and only two) keys (except controller buttons) by using & between them. In the example below, you would hold down Numpad0 then press Numpad1 o...
- 09 May 2024, 11:34
- Forum: Ask for Help (v2)
- Topic: tray icons usage Topic is solved
- Replies: 9
- Views: 433
Re: tray icons usage Topic is solved
what do you mean? after making them in svg, i scale them to let's say 256x256 png then convert png to ico. and pretty sure then windows downscales it to 16x16 or whatever scale it needs for the taskbar. works for me
- 09 May 2024, 08:28
- Forum: Ask for Help (v2)
- Topic: tray icons usage Topic is solved
- Replies: 9
- Views: 433
Re: tray icons usage Topic is solved
yeah okay thank you. i'm currently working on making my own icons too but in svg then i can make them any size without losing quality and convert to .ico
- 09 May 2024, 07:02
- Forum: Ask for Help (v2)
- Topic: tray icons usage Topic is solved
- Replies: 9
- Views: 433
Re: tray icons usage Topic is solved
okay, thank you mikey and boiler
- 09 May 2024, 01:09
- Forum: Ask for Help (v2)
- Topic: tray icons usage Topic is solved
- Replies: 9
- Views: 433
tray icons usage Topic is solved
hello. i was reaading on the usage of tray icons in ahk v2 but some things remain unclear to me. 1. it seems as though the .ico format is most desired. does it have any advantages?? 2. are there recommendations for icon size / resolution ?? 3. is it possible to, say, put a rectangular icon and have ...
- 08 May 2024, 05:30
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
okay i guess i can make this. if i want to disable / enable the device do i make 2 script files or is there a way to put them both in one file and trigger each when needed? also make sure that "script path" is on allowlist in windows. what do you mean? and hhow is this done? edit 1: now that i think...
- 07 May 2024, 14:57
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
not sure if you saw the edit of my last message. anyway i fixed the issue and now it works. debugged using "-noexit" and fixing the ampersand in ahk. i want to now fix the issue of using runas with my personal account. how do we go about this? RunAs "user1" , "password123" , "@domainname" param := '...
- 07 May 2024, 14:10
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
i never ran it in a batch file. i tried just the code in powershell when launched as admin edit 1: ook will look into it. can i just know how i can solve my other problem. the issue with logging in providing username and password (i might use this approach for other things too). this is my code (if ...
- 07 May 2024, 14:06
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
i tried this. powershell windows flashes for a split second then closes and the device isnot disabled. param := 'PNPUTIL /disable-device /deviceid `"my_hid`" ' app := 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' commandLine := '"' app '" "' param '"' Run '*RunAs ' commandLine
- 07 May 2024, 13:17
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
yeah i ran it and i'm getting "the system cannot find the file specified ". Error: Failed attempt to launch program or document: Action: <PNPUTIL /disable-device /deviceid "MY_HID" > Verb: <RunAs> Params: <> another opinion: how about we use the approach in run as documentation? RunAs "Administrator...
- 07 May 2024, 12:59
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
okay i get your point but i have no idea how to use it. the quotation marks are confusing me. is this correct syntax?
Run '*RunAs "PNPUTIL /disable-device /deviceid `"MY_HID`""'
Run '*RunAs "PNPUTIL /disable-device /deviceid `"MY_HID`""'
- 07 May 2024, 12:46
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
Re: run command line as admin
the example you referenced attempts to run the entire ahk script as admin (with a dialog box). i want to just run that specific line as admin, is this possible?
- 07 May 2024, 12:16
- Forum: Ask for Help (v2)
- Topic: run command line as admin
- Replies: 15
- Views: 961
run command line as admin
hello. i have the following snippet of code (provided below). the code works when run in an elevated powershell. when i integrated it to ahk, running the script without admin rights and my code doesn't work. i tried running the ahk script as admin and it worked. my question is. what approaches are t...
- 06 May 2024, 06:21
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
Re: optimize code converted from v1.1 Topic is solved
thank you and thank you for referencing the documentation it helps a lot!
- 06 May 2024, 04:55
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
Re: optimize code converted from v1.1 Topic is solved
okay, thank you both. both codes work. one last question. if i want to remove the comma and use two lines, do i also have to add brackets for the if ??
before:
after: ??
before:
Code: Select all
if !(Send("^c"), ClipWait(0.1))
Send("^a^c"), ClipWait()
Code: Select all
if !(Send("^c"), ClipWait(0.1)){
Send("^a^c")
ClipWait()
}
- 05 May 2024, 22:31
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
Re: optimize code converted from v1.1 Topic is solved
thank you it works but i have something Noitalommi_2 . i don't want to be picky but how it worked before in regex it only detected a-z characters which makes "Hi HeLlO" my output. with your code it capitalizes the space (no effect) so i kind of get "Hi hElLo" if you get what i mean. can this be fixe...
- 05 May 2024, 11:53
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
Re: optimize code converted from v1.1 Topic is solved
okay thank you noitalommi. with regards to my post about alternating cases, is there something i can do besides fixing the first few lines that contain the errorlevel?? OldClipboardBackup := ClipboardAll() A_Clipboard := "" ; Empties the Clipboard. Send("^c") ; Sends Control + C (Copy) to copy text....
- 05 May 2024, 11:44
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
Re: optimize code converted from v1.1 Topic is solved
okay thank you, can i bother you with checking out my other hotkey that switches the cases of letters (using regex) if it can be optimized? thanks in advance ^NumpadMult:: { ; Hotkey to make selected text have alternated cases AlternatingCaseStartingNumber := "0" OldClipboardBackup := ClipboardAll()...
- 05 May 2024, 10:14
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
Re: optimize code converted from v1.1 Topic is solved
i never fully understood what errorlevel was in 1.1 but what do you mean its not needed in v2.0??
also can you please just explain to me these lines? i don't understand what they mean. is the comma considered "and" in this context??
also can you please just explain to me these lines? i don't understand what they mean. is the comma considered "and" in this context??
Code: Select all
if !(Send("^c"), ClipWait(0.1))
Send("^a^c"), ClipWait()
- 05 May 2024, 01:55
- Forum: Ask for Help (v2)
- Topic: optimize code converted from v1.1 Topic is solved
- Replies: 15
- Views: 675
optimize code converted from v1.1 Topic is solved
hello. i had a working v1.1 code that capitalizes selected text (or all text if none is selected). i converted it to v2.0 using joe glines' converter and it works. i just want to ask if there is a way to optimize the current code or if it is fine? thanks in advance. ^NumpadAdd:: { ; Hotkey to make s...