Search found 517 matches

by sinkfaze
23 Sep 2019, 08:48
Forum: Ask For Help
Topic: Pasting strings does not always work
Replies: 16
Views: 669

Re: Pasting strings does not always work

Ideally you'd like to run a loop to check that the variables are changing at each step, but that (for me) just makes the script more burdensome to manage than just seeding each step with an arbitrary sleep time. At worst your hotkey will take a little over a second to execute, and if it works you ca...
by sinkfaze
19 Sep 2019, 09:49
Forum: Ask For Help
Topic: Convert cell names in spreadsheets to numbers Topic is solved
Replies: 16
Views: 704

Re: Convert cell names in spreadsheets to numbers Topic is solved

Since modern spreadsheets breech three alpha chars for the columns, a slight modification to boiler's code: Loop { InputBox, CellName, Cell Name, Input cell name:`n(Cancel to exit),, 180, 150 if ErrorLevel ExitApp RegExMatch(CellName, "([A-Z]+)(\d+)", Part), RowNum := Part2 - 1 if (StrLen(Part1) = 3...
by sinkfaze
09 Sep 2019, 08:24
Forum: Ask For Help
Topic: Loop toggle not working
Replies: 12
Views: 908

Re: Loop toggle not working

I can't watch the video at the moment, but if you need to break operation immediately then 2::Reload is probably your best bet. But time is going to be going by fast in your script, so at least some keystrokes beyond what you need are going to get buffered and executed despite your reload. It will p...
by sinkfaze
04 Sep 2019, 07:53
Forum: Ask For Help
Topic: Loop toggle not working
Replies: 12
Views: 908

Re: Loop toggle not working

Are you looking for the code to stop when the current iteration of the loop finishes, or break operation immediately?
by sinkfaze
24 Jul 2019, 07:57
Forum: Ask For Help
Topic: Problem with RegExMatch Topic is solved
Replies: 6
Views: 337

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: 337

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: 976

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: 205

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: 258

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: 258

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: 113

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: 322

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: 1603

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: 260

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: 349

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: 867

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: 891

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: 530

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: 829

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: 829

Re: Coordinates

What is your script trying to do?

Go to advanced search