Search found 520 matches

by sinkfaze
11 Mar 2019, 07:57
Forum: Ask for Help (v1)
Topic: Copy from Excel and Paste Tab Delimited Until Clipboard is Empty? Topic is solved
Replies: 9
Views: 2527

Re: Copy from Excel and Paste Tab Delimited Until Clipboard is Empty? Topic is solved

What does this mean please? RegExReplace(Clipboard,"s)\s+$") When you copy data from Excel to the Clipboard, it will leave a trailing newline after you data (and on some rare occasions a tab), which will affect how a parsing loop parses the data. I use RegExReplace() to remove any of that trailing ...
by sinkfaze
08 Mar 2019, 16:06
Forum: Ask for Help (v1)
Topic: A bit lost regarding toggling Loops
Replies: 4
Views: 615

Re: A bit lost regarding toggling Loops

Just out of curiosity, why do you wish to embed this in a function?
by sinkfaze
08 Mar 2019, 15:52
Forum: Ask for Help (v1)
Topic: Copy from Excel and Paste Tab Delimited Until Clipboard is Empty? Topic is solved
Replies: 9
Views: 2527

Re: Copy from Excel and Paste Tab Delimited Until Clipboard is Empty? Topic is solved

Decrementing the contents of the Clipboard is going to be considerably more trouble than it's worth, better to push the contents to an array and send each field when needed. Clipboard := RegExReplace(Clipboard,"s)\s+$") , data := [] , i := 1 Loop, Parse, Clipboard, `n, `r Loop, Parse, A_LoopField, `...
by sinkfaze
08 Mar 2019, 15:03
Forum: Ask for Help (v1)
Topic: A bit lost regarding toggling Loops
Replies: 4
Views: 615

Re: A bit lost regarding toggling Loops

A loop like that, generally, is not a good way to run a toggle.

Might I suggest using SetTimer instead?

Code: Select all

F5::
Toggle := !Toggle
SetTimer, SendQ, %	Toggle ? 10 : "Off"
return

SendQ:
Send q
return
by sinkfaze
08 Mar 2019, 14:33
Forum: Forum Issues
Topic: Limited to 3 images?
Replies: 3
Views: 1504

Re: Limited to 3 images?

We're having trouble with a malicious spammer who is uploading tens of obscene images in a post, we have taken measures to counteract his ability to spam here, I'm certain that your issue stems from this.
by sinkfaze
07 Mar 2019, 13:06
Forum: Ask for Help (v1)
Topic: Windows 7 to Windows 10: Having to Reload Script
Replies: 15
Views: 3428

Re: Windows 7 to Windows 10: Having to Reload Script

That's hard for us to determine if we can't see your script, can you share it?
by sinkfaze
07 Mar 2019, 13:04
Forum: General Discussion
Topic: Is AHK dead? (not developed any more)
Replies: 62
Views: 22719

Re: Is AHK dead? (not developed any more)

I have moved this to Offtopic.
by sinkfaze
04 Mar 2019, 16:39
Forum: Ask for Help (v1)
Topic: Excel-COM: Cycle through sheets of closed file? Topic is solved
Replies: 2
Views: 559

Re: Excel-COM: Cycle through sheets of closed file? Topic is solved

You shouldn't need to use an extra line to go to the next sheet, the for -loop (and the sheet instance) will do it for you. F5:: xl := ComObjGet("C:\Users\USER\Documents\Logitech Gaming Software\Screenshots meiner Profile.xlsx") for sheet in xl.sheets { name := sheet.range("V1").value ; using 'sheet...
by sinkfaze
04 Mar 2019, 15:04
Forum: Ask for Help (v1)
Topic: send keys from spreadsheet
Replies: 9
Views: 1966

Re: send keys from spreadsheet

If you copy the data from Excel and place the cursor in the right starting point in your entry program, you can just parse through the Clipboard:

Code: Select all

Clipboard :=	RegExReplace(Clipboard,"`as)\v+$")	; remove trailing newline
Loop, parse, Clipboard, `n, `r
{
	Send %A_LoopField%
	Sleep, 500
}
return
by sinkfaze
04 Mar 2019, 12:24
Forum: Forum Issues
Topic: Yellow user names
Replies: 20
Views: 12937

Re: Yellow user names

It should be known: this is extremely annoying. We understand it's extremely annoying, and we're sorry about that, but you have to understand that we have to weigh your extreme annoyance (and maybe one or two other new users) against the extreme annoyance of a sizable swath of the user base who has...
by sinkfaze
04 Mar 2019, 11:16
Forum: Ask for Help (v1)
Topic: Ein Zeichen innerhalb einer Zeichenkette einfügen
Replies: 6
Views: 969

Re: Ein Zeichen innerhalb einer Zeichenkette einfügen

So you're trying to add a period after the track number if it doesn't already exist?

Code: Select all

track=12 Testvideo.mp4
MsgBox %	RegExReplace(track,"\b\d+\b(?!\.)","$0.")
:?:
by sinkfaze
28 Feb 2019, 08:52
Forum: Ask for Help (v1)
Topic: one key for open and close
Replies: 3
Views: 963

Re: one key for open and close

Which part of the code isn't doing what you expect?
by sinkfaze
27 Feb 2019, 16:23
Forum: Ask for Help (v1)
Topic: Move operation to clipboard
Replies: 6
Views: 1413

Re: Move operation to clipboard

Can you post samples of text where the code fails? Redact any sensitive information if necessary.
by sinkfaze
27 Feb 2019, 15:28
Forum: Ask for Help (v1)
Topic: Move operation to clipboard
Replies: 6
Views: 1413

Re: Move operation to clipboard

Code: Select all

^!+p::
var :=	Clipboard
Loop, parse, var, `n, `r
{
	Clipboard :=		"<p>" A_LoopField "</p>`r"
	ClipWait
	SendRaw, ^v
}
return
:?:
by sinkfaze
27 Feb 2019, 10:20
Forum: Ask for Help (v1)
Topic: Search in all .txt files in a directory
Replies: 4
Views: 974

Re: Search in all .txt files in a directory

So is your above code an attempt to do what you suggested? Also, I'm not seeing where the data2 var comes into play.
by sinkfaze
25 Feb 2019, 08:57
Forum: Ask for Help (v1)
Topic: Help keeping a script running
Replies: 8
Views: 2302

Re: Help keeping a script running

Probably the easiest way will be to run two separate timers, one for your reliable task and one that waits to close the window: #Persistent SetTimer, MainProcess, 1000 SetTimer, CloseWindow, 1000 return MainProcess: if WinActive("ahk_exe SDLTradosStudio.exe") && WinExist("Information") { WinGetText,...
by sinkfaze
22 Feb 2019, 15:17
Forum: Ask for Help (v1)
Topic: Help keeping a script running
Replies: 8
Views: 2302

Re: Help keeping a script running

What it's telling you is that WinWait is not detecting the requested window, and since you did not set anything in the Seconds parameter, it will wait infinitely to find the window. Probably the easiest thing to do is create a test hotkey with WinWait and some variation of the information needed to ...
by sinkfaze
22 Feb 2019, 14:09
Forum: Ask for Help (v1)
Topic: Help keeping a script running
Replies: 8
Views: 2302

Re: Help keeping a script running

Are you sure it runs only once? Did you check ListLines? I have a sneaking suspicion that you're getting stuck here:

WinWait, Add Supported Language Pairs
by sinkfaze
22 Feb 2019, 11:14
Forum: Ask for Help (v1)
Topic: Help keeping a script running
Replies: 8
Views: 2302

Re: Help keeping a script running

Try running it as a timer instead: #Persistent SetTimer, AddLanguagePairs, 1000 return AddLanguagePairs: if WinActive("ahk_exe SDLTradosStudio.exe") && WinExist("Information") { WinGetText, text Send {Esc} RegExMatch(text,"'\K[^']+",TMname) Sleep 100 Send !u Sleep 100 Send {Down 6}{Enter} Sleep 100 ...
by sinkfaze
22 Feb 2019, 10:49
Forum: Ask for Help (v1)
Topic: Search in all .txt files in a directory
Replies: 4
Views: 974

Re: Search in all .txt files in a directory

You could use a file loop for that.

Go to advanced search