Search found 1290 matches

by RussF
Today, 07:58
Forum: Ask for Help (v2)
Topic: Read, write and alert script
Replies: 5
Views: 203

Re: Read, write and alert script

I'm pretty sure that automating your Discord channel violates their terms of service, so for us to help would be no different than helping someone code any other type of malware, i.e. keyloggers, pranks, etc.

Russ
by RussF
Today, 07:39
Forum: Off-topic Discussion
Topic: « What's on your mind? » Topic is solved
Replies: 4898
Views: 1413858

Re: « What's on your mind? » Topic is solved

I started getting AI generated "Overviews" with every Google search as I'm sure most of you have as well. While researching a way to turn them off, (you can't, by the way), I came across a posting on support.google where hundreds of people felt the same way. I tried to post the following response: W...
by RussF
Yesterday, 14:41
Forum: Ask for Help (v1)
Topic: Functions and RETURN
Replies: 6
Views: 420

Re: Functions and RETURN

...is there a possibility to leave any traces of the function running in the background causing memory leak or similar problems, please? No, the closing brace } IS the end of the function. As I said, in AHK, the Return statement is not necessary unless you are returning a value. Whether of not you ...
by RussF
Yesterday, 11:55
Forum: Ask for Help (v1)
Topic: Shifting Only Start Position Each Loop
Replies: 4
Views: 271

Re: Shifting Only Start Position Each Loop

Thank you boiler - a typo on my part. I will fix the code above. As I think about it, I was getting my x and y confused regarding displays, and even a 4k display at 100% scaling would not be able to support a y value of 3054, since a 4k display has a resolution of 3840 (x) by 2160 (y). The largest n...
by RussF
Yesterday, 10:30
Forum: Ask for Help (v1)
Topic: Shifting Only Start Position Each Loop
Replies: 4
Views: 271

Re: Shifting Only Start Position Each Loop

You could try this (untested): Loop, 32 { SetTitleMatchMode, 2 CoordMode, Mouse, Window tt = Issues WinWait, %tt% IfWinNotActive, %tt%,, WinActivate, %tt% Sleep, 600 MouseClick, L, 1464, (604 + ((A_Index - 1) * 50) ; Select task line (I want to shift this command down 50 pixels after each loop) Slee...
by RussF
15 May 2024, 14:03
Forum: Ask for Help (v1)
Topic: Functions and RETURN
Replies: 6
Views: 420

Re: Functions and RETURN

One way is not any "better" than the other. It is not necessary to have a Return in AHK. That said, MANY other languages DO require a Return at the end of a function and I usually use one out of years of habit. It also helps me to know I am definitely at the end of the function. Just as a side note ...
by RussF
15 May 2024, 13:45
Forum: Ask for Help (v1)
Topic: Trying to simulate laptop 'fn' key
Replies: 3
Views: 451

Re: Trying to simulate laptop 'fn' key

This topic has been addressed many times on these forums. The Fn key does not (as a general rule) generate any scan code that can be used by AHK. The key is intercepted and interpreted directly by the PC's BIOS. On a laptop, there is usually a toggle setting in the BIOS that will switch the function...
by RussF
15 May 2024, 12:09
Forum: Ask for Help (v1)
Topic: Functions and RETURN
Replies: 6
Views: 420

Re: Functions and RETURN

A Return statement is not required for a function unless you are returning a value to the caller, for example: #Requires AutoHotkey v1.1.33+ MsgBox % Sum(5,9) Exitapp Sum(a,b) { c := a + b Return % c } or #Requires AutoHotkey v1.1.33+ MsgBox % Sum(5,9) Exitapp Sum(a,b) { Return (a + b) } Russ
by RussF
14 May 2024, 14:46
Forum: Ask for Help (v1)
Topic: Can't edit script
Replies: 3
Views: 407

Re: Can't edit script

Jasper wrote:my script isn't working!
... doesn't tell us anything.

Code: Select all

while (GetKeyState("v", "P"))
... should work just fine.
Jasper wrote:my_code_and_you_need_not_to_read_it
... will be why you probably won't get any more replies. Without context and exact behavior, no one can help you.

Russ
by RussF
14 May 2024, 14:40
Forum: Ask for Help (v2)
Topic: Send menu item to other function?
Replies: 5
Views: 213

Re: Send menu item to other function?

You forgot the asterisk.

Code: Select all

chosenSwitch(var,*)
Russ
by RussF
08 May 2024, 14:58
Forum: Ask for Help (v2)
Topic: Progressive removal of text in Text Control?
Replies: 5
Views: 390

Re: Progressive removal of text in Text Control?

Try this Steve: #SingleInstance #Requires AutoHotkey v2+ ; disappearing text experiment guiTitle := 'Color Change' str := 'the quick brown fox jumps over' mg := Gui(, guiTitle) mg.SetFont('s16 cBlue','Consolas') sBlue := mg.Add('text', 'w400', str) mg.Show() #hotif WinActive(guiTitle) Space:: { sBlu...
by RussF
08 May 2024, 14:09
Forum: Ask for Help (v1)
Topic: Question regarding --> DllCall("DeleteObject", "Ptr", hBM)
Replies: 6
Views: 803

Re: Question regarding --> DllCall("DeleteObject", "Ptr", hBM)

1) I would say that once you are done with it, you can delete it.

2) See Freeing Objects. Either way should work.

Russ
by RussF
08 May 2024, 13:35
Forum: Ask for Help (v1)
Topic: Question regarding --> DllCall("DeleteObject", "Ptr", hBM)
Replies: 6
Views: 803

Re: Question regarding --> DllCall("DeleteObject", "Ptr", hBM)

In your first example, you are returning hBM from the function call, so you probably don't want to delete it before you return it. hBM is one of the arguments in the second example - I can't say what the overall effect of deleting it to the system would be. I guess my question is why? Are you experi...
by RussF
08 May 2024, 12:40
Forum: Ask for Help (v1)
Topic: Question regarding --> DllCall("DeleteObject", "Ptr", hBM)
Replies: 6
Views: 803

Re: Question regarding --> DllCall("DeleteObject", "Ptr", hBM)

Anything after a Return will not be executed.

Russ
by RussF
06 May 2024, 13:36
Forum: Off-topic Discussion
Topic: Antivirus Deleted our .ahk files (and AutoHotkey.exe)
Replies: 2
Views: 532

Re: Antivirus Deleted our .ahk files (and AutoHotkey.exe)

I got my first AV hit ever on AHK from Bitdefender (our managed AV system) at the end of March when I downloaded V2.0.12 . It did not quarantine them, just notified me as suspicious. I've honestly never heard of Defender actually deleting files (especially scripts, which are just text files.) It sho...
by RussF
06 May 2024, 11:35
Forum: Ask for Help (v2)
Topic: Append to script that is also #Included? Topic is solved
Replies: 2
Views: 190

Re: Append to script that is also #Included? Topic is solved

Try this:

Code: Select all

FileAppend("new text`n", A_ScriptDir "\included script.ahk")
Russ
by RussF
02 May 2024, 11:21
Forum: Ask for Help (v1)
Topic: Need help with a project
Replies: 4
Views: 474

Re: Need help with a project

Also... From https://www.autohotkey.com/docs/v1/Concepts.htm#names Although a variable name may consist entirely of digits, this is generally used only for incoming command line parameters. Such numeric names cannot be used in expressions because they would be seen as numbers rather than variables. ...
by RussF
02 May 2024, 10:23
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1356

Re: save and close Excel2010

flyingDman I don't disagree with you at all. While I am nowhere near your level of expertise with COM and may struggle coming up with the command structure I need, I CAN infer from context what a given command does and can usually edit it to my needs. Reading the room, the OP seemed clearly intimid...
by RussF
02 May 2024, 08:31
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1356

Re: save and close Excel2010

Now to see if I can incorporate the 'save to USB' code .... We simply need to incorporate flyingDman 's code above without the line that closes Excel. #Requires AutoHotkey v1.1.33+ ; Microsoft Excel - Book1.xlsx SetTitleMatchMode 2 WinActivate, ahk_class XLMAIN send ^s sleep 1000 ; adjust as necess...
by RussF
02 May 2024, 06:09
Forum: Ask for Help (v1)
Topic: save and close Excel2010
Replies: 17
Views: 1356

Re: save and close Excel2010

So, if we are to understand you correctly, Copying to a USB drive is no longer a priority because you are doing it 'your own way'. All you really want to do is save an open Excel spreadsheet - and double-clicking a desktop icon is easier to you than clicking File->Save in Excel or pressing Ctrl-S (w...

Go to advanced search