Search found 518 matches
- 08 Jan 2020, 09:03
- Forum: Ask For Help
- Topic: Excel search for "text" and the formula Topic is solved
- Replies: 4
- Views: 535
Re: Excel search for "text" and the formula Topic is solved
Just to further clarify on TLM's solution, if you don't specify where you want to look in the LookIn parameter of Find() , Excel will check everything; if a cell in the range has a formula, it's going to search the text of the formula and the result of the formula (the value). If you want it to sear...
- 23 Sep 2019, 08:48
- Forum: Ask For Help
- Topic: Pasting strings does not always work
- Replies: 16
- Views: 2008
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...
- 19 Sep 2019, 09:49
- Forum: Ask For Help
- Topic: Convert cell names in spreadsheets to numbers Topic is solved
- Replies: 16
- Views: 1741
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...
- 09 Sep 2019, 08:24
- Forum: Ask For Help
- Topic: Loop toggle not working
- Replies: 13
- Views: 2451
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...
- 04 Sep 2019, 07:53
- Forum: Ask For Help
- Topic: Loop toggle not working
- Replies: 13
- Views: 2451
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?
- 24 Jul 2019, 07:57
- Forum: Ask For Help
- Topic: Problem with RegExMatch Topic is solved
- Replies: 6
- Views: 828
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.
- 24 Jul 2019, 07:50
- Forum: Ask For Help
- Topic: Problem with RegExMatch Topic is solved
- Replies: 6
- Views: 828
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.
- 25 Jun 2019, 13:36
- Forum: Ask For Help
- Topic: Basic Excel Com Obj script Topic is solved
- Replies: 16
- Views: 2833
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

- 20 Jun 2019, 10:56
- Forum: Ask For Help
- Topic: Variable Excel Sheet Name Error
- Replies: 2
- Views: 517
Re: Variable Excel Sheet Name Error
Code: Select all
vSheetName := SheetName ; <~~ no percent signs around 'SheetName'
- 20 Jun 2019, 10:54
- Forum: Ask For Help
- Topic: Newbie Help with Hotstring
- Replies: 4
- Views: 627
Re: Newbie Help with Hotstring
Try this instead:
Beyond that, you're going to have to experiment with the Send modes and key delays, because the receiving program is causing the problem.
Code: Select all
:*t0:<c*::
(
<comment author="abcd">
</comment>
)
Sleep, 25
Send {HOME}{UP 2}
return
- 20 Jun 2019, 10:09
- Forum: Ask For Help
- Topic: Newbie Help with Hotstring
- Replies: 4
- Views: 627
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.
This works fine for me.
Code: Select all
:*t0:<c*::<comment author="abcd">{ENTER 2}</comment>{ENTER}{HOME}{UP 2}
- 20 Jun 2019, 07:45
- Forum: Ask For Help
- Topic: ö or ø in auto-replace
- Replies: 1
- Views: 291
Re: ö or ø in auto-replace
Are you using a Unicode version of Autohotkey?
- 18 Jun 2019, 14:16
- Forum: Ask For Help
- Topic: RegEx lookbehind assertion question Topic is solved
- Replies: 2
- Views: 699
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 +.
- 18 Jun 2019, 12:22
- Forum: Ask For Help
- Topic: Name Permutation.
- Replies: 23
- Views: 3241
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
- 30 May 2019, 15:34
- Forum: Ask For Help
- Topic: Convert AHK script into VBA and run from Excel
- Replies: 1
- Views: 667
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...
- 29 May 2019, 08:24
- Forum: Ask For Help
- Topic: Unprotect Excel worksheet
- Replies: 3
- Views: 759
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
- 28 May 2019, 15:54
- Forum: Ask For Help
- Topic: RegExMatch help
- Replies: 14
- Views: 2126
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
- 28 May 2019, 12:37
- Forum: Ask For Help
- Topic: Divide String by number of characters Topic is solved
- Replies: 11
- Views: 1829
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
- 10 Apr 2019, 08:12
- Forum: Ask For Help
- Topic: Need help with keyword search Topic is solved
- Replies: 6
- Views: 1104
- 08 Apr 2019, 11:33
- Forum: Ask For Help
- Topic: Coordinates
- Replies: 11
- Views: 1736
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...