Search found 511 matches

by sinkfaze
25 Jun 2019, 13:36
Forum: Ask For Help
Topic: Basic Excel Com Obj script Topic is solved
Replies: 16
Views: 497

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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, ...
by sinkfaze
03 Apr 2019, 10:41
Forum: Ask For Help
Topic: FormatTime Issues Topic is solved
Replies: 5
Views: 393

Re: FormatTime Issues Topic is solved

Code: Select all

xl :=	ComObjActive("Excel.Application"), xl.screenUpdating :=	0
xl.Range("O:O").NumberFormat :=	"yyyymmdd""000000"""
xl.screenUpdating :=	1
Remember that once you do this conversion you'll have to extract the timestamp from the cells using the Text property, not the Value property.
by sinkfaze
02 Apr 2019, 13:57
Forum: Ask For Help
Topic: If and or statements Topic is solved
Replies: 4
Views: 206

Re: If and or statements Topic is solved

Well that's much easier to solve.

(Code != "ABC" or Code != "XYZ")

There is literally no value for Code which will cause this statement to evaluate as true. Perhaps you meant to evaluate with and?

(Code != "ABC" and Code != "XYZ")

Go to advanced search