Search found 513 matches

by sinkfaze
24 Jul 2019, 07:57
Forum: Ask For Help
Topic: Problem with RegExMatch Topic is solved
Replies: 6
Views: 219

Re: Problem with RegExMatch Topic is solved

Also, .Count returns the overall number of subpatterns in your regex, so it's returning what's expected based on your regexes. If you want to see the match, you should use .Value.
by sinkfaze
24 Jul 2019, 07:50
Forum: Ask For Help
Topic: Problem with RegExMatch Topic is solved
Replies: 6
Views: 219

Re: Problem with RegExMatch Topic is solved

regex101 uses an implementation of regex with a global flag, which tells the engine to keep matching until no more matches can be found. AHK does not.
by sinkfaze
25 Jun 2019, 13:36
Forum: Ask For Help
Topic: Basic Excel Com Obj script Topic is solved
Replies: 16
Views: 545

Re: Basic Excel Com Obj script Topic is solved

Code: Select all

::#cam1::
xl :=	ComObjGet("C:\Users\Enrique\Desktop\Codes\Excel COM\TEST - 00000 - Comobject Test Sheet.xlsx")
Send, %	x1.Range("B3").value
Send, %	xl.Range("B11").Value
return
:?:
by sinkfaze
20 Jun 2019, 10:56
Forum: Ask For Help
Topic: Variable Excel Sheet Name Error
Replies: 2
Views: 110

Re: Variable Excel Sheet Name Error

Code: Select all

vSheetName :=	SheetName	; <~~ no percent signs around 'SheetName'
by sinkfaze
20 Jun 2019, 10:54
Forum: Ask For Help
Topic: Newbie Help with Hotstring
Replies: 4
Views: 139

Re: Newbie Help with Hotstring

Try this instead:

Code: Select all

:*t0:<c*::
(
<comment author="abcd">

</comment>

)
Sleep, 25
Send {HOME}{UP 2}
return
Beyond that, you're going to have to experiment with the Send modes and key delays, because the receiving program is causing the problem.
by sinkfaze
20 Jun 2019, 10:09
Forum: Ask For Help
Topic: Newbie Help with Hotstring
Replies: 4
Views: 139

Re: Newbie Help with Hotstring

I think eliminating the automatic backspacing is unnecessary, just adds complexity to what you're trying to do.

This works fine for me.

Code: Select all

:*t0:<c*::<comment author="abcd">{ENTER 2}</comment>{ENTER}{HOME}{UP 2}
by sinkfaze
20 Jun 2019, 07:45
Forum: Ask For Help
Topic: ö or ø in auto-replace
Replies: 1
Views: 66

Re: ö or ø in auto-replace

Are you using a Unicode version of Autohotkey?
by sinkfaze
18 Jun 2019, 14:16
Forum: Ask For Help
Topic: RegEx lookbehind assertion question Topic is solved
Replies: 2
Views: 212

Re: RegEx lookbehind assertion question Topic is solved

Look-ahead and look-behind assertions wrote: Look-behinds are more limited than look-aheads because they do not support quantifiers of varying size such as *, ?, and +.
by sinkfaze
18 Jun 2019, 12:22
Forum: Ask For Help
Topic: Name Permutation.
Replies: 23
Views: 1001

Re: Name Permutation.

Code: Select all

var=John Smith David James
Loop %	(n :=	StrSplit(var," ")).MaxIndex()
{
	For i, p in n
		out .=	p " "
	out :=	 SubStr(out,1,StrLen(out)-1) "`n", n.Push(n.RemoveAt(1))
}
MsgBox %	out
by sinkfaze
30 May 2019, 15:34
Forum: Ask For Help
Topic: Convert AHK script into VBA and run from Excel
Replies: 1
Views: 157

Re: Convert AHK script into VBA and run from Excel

AHK is part of RPA, but is likely frowned upon by employers Most of the long-timers here have worked with AHK at some of the biggest companies in the world, so long as you have a good business justification prepared in case they want one you should have almost no problem installing AHK on a work co...
by sinkfaze
29 May 2019, 08:24
Forum: Ask For Help
Topic: Unprotect Excel worksheet
Replies: 3
Views: 239

Re: Unprotect Excel worksheet

If you are unprotecting a sheet that does not have a password:

Code: Select all

xl :=	ComObjActive("Excel.Application")
 , xl.ActiveSheet.Unprotect
by sinkfaze
28 May 2019, 15:54
Forum: Ask For Help
Topic: RegExMatch help
Replies: 14
Views: 572

Re: RegExMatch help

Is there a reason that you can't use this?

Code: Select all

var=<hold>17,293 Plans</hold>
RegExMatch(var,"[\d`,]+",m)
MsgBox %	m
by sinkfaze
28 May 2019, 12:37
Forum: Ask For Help
Topic: Divide String by number of characters Topic is solved
Replies: 11
Views: 625

Re: Divide String by number of characters Topic is solved

Another way to do it, just as an interesting exercise:

Code: Select all

var=FFD8FFE000104A46494600010101006000600000FFDB0043000201010201010202020202020202030503
Loop %	(StrLen(var) // 10)
	out .=	SubStr(var,((A_Index-1)*10)+1,10) "`n"
out .=	SubStr(var,-(Mod(StrLen(var),10))+1)
MsgBox %	out
by sinkfaze
10 Apr 2019, 08:12
Forum: Ask For Help
Topic: Need help with keyword search Topic is solved
Replies: 6
Views: 388

Re: Need help with keyword search Topic is solved

Scr1pter wrote:
10 Apr 2019, 07:12
What happened to the topic title?
I never saw one. I have now added one.
by sinkfaze
08 Apr 2019, 11:33
Forum: Ask For Help
Topic: Coordinates
Replies: 11
Views: 605

Re: Coordinates

this line if ((posX >= 719) && (posY >= 942)) || ((posX >= 995) && (posY >= 1008)) doesn't really define the boundaries under which the code should work. If the area should be between two x/y coordinate then you should have >= and <= for x/y boundaries. Also, as logic goes you would want the stateme...
by sinkfaze
08 Apr 2019, 10:26
Forum: Ask For Help
Topic: Coordinates
Replies: 11
Views: 605

Re: Coordinates

What is your script trying to do?
by sinkfaze
05 Apr 2019, 14:51
Forum: Ask For Help
Topic: VBScript.Regex and highlighting text Topic is solved
Replies: 4
Views: 346

Re: VBScript.Regex and highlighting text Topic is solved

Tables have a lot of "junk" that you encounter using VBA that you don't see on your screen. You could iterate the table, pull each value out of each cell and evaluate/highlight that way, but as far as using Range itself there's not much that you can do to get around the issues.
by sinkfaze
05 Apr 2019, 14:07
Forum: Ask For Help
Topic: "Clipboard :=" does not always empty the clipboard immediately Topic is solved
Replies: 33
Views: 2033

Re: "Clipboard :=" does not always empty the clipboard immediately Topic is solved

Possible workaround:

Code: Select all

tmp :=	Clipboard, cx :=	A_CaretX, cy :=	A_CaretY
Sleep, 25
Send ^v
While	(cx=A_CaretX) && (cy=A_CaretY)
	Sleep, 25
Clipboard :=	tmp
by sinkfaze
04 Apr 2019, 15:39
Forum: Ask For Help
Topic: extra "button down" reported by keyhistory
Replies: 2
Views: 221

Re: extra "button down" reported by keyhistory

I'm going to move this to Ask for Help first to confirm that there is a bug, if we can confirm it then we'll move to Bug Reports.
by sinkfaze
04 Apr 2019, 10:25
Forum: Ask For Help
Topic: Size of array after stringsplit Topic is solved
Replies: 6
Views: 438

Re: Size of array after stringsplit Topic is solved

Just for clarity's sake: StringSplit - OutputArray wrote: The name of the pseudo-array in which to store each substring extracted from InputVar. For example, if MyArray is specified, the command will put the number of substrings produced (0 if none) into MyArray0, the first substring into MyArray1, ...

Go to advanced search