Search found 503 matches

by AlphaBravo
21 Jan 2021, 15:51
Forum: Ask For Help
Topic: Can't delete text between "([[ ]])" Topic is solved
Replies: 7
Views: 113

Re: Can't delete text between "([[ ]])" Topic is solved

Code: Select all

RegExReplace(Clipboard, "\[\w*?\]\(\[\[\w*?\]\]\)\h+")
by AlphaBravo
08 Jan 2021, 11:00
Forum: Ask For Help
Topic: .Find() in Excel with if clause
Replies: 3
Views: 151

Re: .Find() in Excel with if clause

This is how the code works, it starts off from the top of your defined range '"rng_vsa_index_main" currentCell := xl.Range("rng_vsa_index_main").Cells[1] and searches for whatever you're looking for expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte, Sear...
by AlphaBravo
07 Jan 2021, 14:21
Forum: Ask For Help
Topic: .Find() in Excel with if clause
Replies: 3
Views: 151

Re: .Find() in Excel with if clause

this code worked for me currentCell := xl.Range("rng_vsa_index_main").Cells[1] while ((thisCell := xl.ActiveSheet.Range("rng_vsa_index_main").find("VSA2445", currentCell)).offset(0,-3).text <> "ALBUMS") currentCell := thisCell MsgBox % thisCell.address to use your defined WorkSheet, it should look l...
by AlphaBravo
24 Dec 2020, 13:13
Forum: Ask For Help
Topic: Circular Child GUI Topic is solved
Replies: 4
Views: 121

Re: Circular Child GUI Topic is solved

Use DockA Gui, Main:Color, EEAA99 ; Peach color Gui, Main:Add, Text,, This is the main Gui Gui, Main: Show, w200 h200, Main Gui Parent := WinExist("Main Gui") Gui, Other: -caption +Owner +AlwaysOnTop Gui, Other: Add, Text, x20 y40, Other Gui Gui, Other: Show, w100 h100, Other GUI Child := WinExist("...
by AlphaBravo
11 Dec 2020, 13:19
Forum: Ask For Help
Topic: Trying to make a script to remove special characters after clipboarding a text.
Replies: 8
Views: 109

Re: Trying to make a script to remove special characters after clipboarding a text.

mikeyww wrote:
11 Dec 2020, 13:01
Easy fix, I think.

Code: Select all

#Persistent
OnClipboardChange("ClipChanged")
Return

ClipChanged(type) {
 If (type = 1)
  MsgBox, % RegexReplace(Clipboard, "\W")
}
@mikeyww, thanks didn't realize OnClipboardChange Label was Deprecated.
by AlphaBravo
11 Dec 2020, 10:50
Forum: Ask For Help
Topic: Trying to make a script to remove special characters after clipboarding a text.
Replies: 8
Views: 109

Re: Trying to make a script to remove special characters after clipboarding a text.

based on what you posted

Code: Select all

#Persistent
return

OnClipboardChange:
original := Clipboard
stripped := RegexReplace(original"[.\-\/!,] ")
Clipboard := stripped
return
by AlphaBravo
20 Nov 2020, 13:25
Forum: Ask For Help
Topic: Copy Excel Row from one instance and paste in another Excel instance Topic is solved
Replies: 3
Views: 134

Re: Copy Excel Row from one instance and paste in another Excel instance Topic is solved

untested

Code: Select all

WB2.ActiveSheet.Range("B1:B15").Value := WB1.ActiveSheet.Range("A1:A15").Value		; copy from active sheet to active sheet
WB2.Sheets(1).Range("B1:B15").Value := WB1.Sheets(2).Range("A1:A15").Value			; copy from wb1 sheet 2 to wb2 sheet1
by AlphaBravo
14 Nov 2020, 20:25
Forum: Ask For Help
Topic: Increase/decrease number in selected text Topic is solved
Replies: 4
Views: 132

Re: Increase/decrease number in selected text Topic is solved

hope it helps

Code: Select all

Clipboard := "21001/2020"
RegExMatch(Clipboard, "(\d+)/(\d+)", number)
Clipboard := number1+1 "/" number2
MsgBox % Clipboard
by AlphaBravo
03 Nov 2020, 10:34
Forum: Ask For Help
Topic: Does ahk support tail recursion? Topic is solved
Replies: 5
Views: 171

Re: Does ahk support tail recursion? Topic is solved

afe wrote: Does ahk support tail recursion?
Yes, tail recursion is explained here
afe wrote: And does the following example count as tail recursion?
no, the example provided will never reach this line : return, f()
by AlphaBravo
31 Oct 2020, 18:03
Forum: Ask For Help
Topic: EXCEL: find string of 9 or more digits
Replies: 8
Views: 199

Re: EXCEL: find string of 9 or more digits

great guys, that helps! thank you :) But I met another problem :)) some of the Excel files has Passwords on it. I want just skip that kind of Excel files use open method with password set to anything "other than the actual password" and try to open it, if it fails then skip it. _ := ComObjMissing()...
by AlphaBravo
28 Oct 2020, 12:58
Forum: Ask For Help
Topic: Getting entire path of xml node Topic is solved
Replies: 4
Views: 135

Re: Getting entire path of xml node Topic is solved

this code may need some clean up but will get you started data = ( <?xml version="1.0"?> <root> <parent-1> </parent-1> <parent-2> <child-1> <grandchild-1> <n>Value1</n> </grandchild-1> <grandchild-2> <n>Value2</n> </grandchild-2> </child-1> <child-2> </child-2> </parent-2> </root> ) xmlDoc := ComObj...
by AlphaBravo
27 Oct 2020, 09:54
Forum: Ask For Help
Topic: Removing odd-numbered keys from an array Topic is solved
Replies: 8
Views: 151

Re: Removing odd-numbered keys from an array Topic is solved

mikeyww , I see a possible flaw using Until !Array[A_Index + 1] in case one of the odd array values is set to 0 here is my solution: Array := ["Item1", "Item2", "Item3", "Item4", 0, "Item6", "Item7", "Item8", "Item9", "Item10", "Item11", "Item12", "Item13"] Num := Ceil(Array.count()/2) loop, % num ...
by AlphaBravo
02 Sep 2020, 09:56
Forum: Ask For Help
Topic: Read COM3 Port Topic is solved
Replies: 4
Views: 187

Re: Read COM3 Port Topic is solved

The script posted here looks promising, I briefly tested an output on Pin 4 DTR and it worked, 7 volts or so to ground (Pin 5), I don't have small jumpers at the moment to test inputs, please check it and report if it works for you.
obviously you need to replace "COM2" with "COM3" in your case.
by AlphaBravo
29 Aug 2020, 12:42
Forum: Ask For Help
Topic: HTML DOM
Replies: 42
Views: 1296

Re: HTML DOM

majstang wrote:
29 Aug 2020, 12:37
AlphaBravo, when using your RegEx on the whole html source (imdb.html) it seems to fail, while mine is still operational. How come? I updated script in post 1.
did you notice I used sub-pattern 1 as in Imdb_Poster1 and not Imdb_Poster?
by AlphaBravo
29 Aug 2020, 12:40
Forum: Ask For Help
Topic: Display a message if for 5 seconds no key is pressed Topic is solved
Replies: 3
Views: 128

Re: Display a message if for 5 seconds no key is pressed Topic is solved

Gregorian wrote:
29 Aug 2020, 12:20
Thank you. But when i close the message box, it appears again.
How can I do it so the message box only appears once?
Press Enter to clear MsgBox and reset A_TimeIdleKeyboard
I'll think of a different way!
OK, use A_TimeIdle instead of A_TimeIdleKeyboard
by AlphaBravo
29 Aug 2020, 11:56
Forum: Ask For Help
Topic: IE navigate fails from Variable Topic is solved
Replies: 5
Views: 210

Re: IE navigate fails from Variable Topic is solved

the following code runs for me, save an html file to your desktop, and run this simple code

Code: Select all

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True
filePath = File:\\%A_Desktop%\IE navigate fails from Variable - AutoHotkey Community.html
wb.Navigate(filePath)
return
by AlphaBravo
29 Aug 2020, 11:30
Forum: Ask For Help
Topic: IE navigate fails from Variable Topic is solved
Replies: 5
Views: 210

Re: IE navigate fails from Variable Topic is solved

change to wb.Navigate(FilePath)

wb.Navigate(%FilePath%) means navigate to the contents of a variable whose name is saved in "FilePath"
by AlphaBravo
29 Aug 2020, 11:29
Forum: Ask For Help
Topic: HTML DOM
Replies: 42
Views: 1296

Re: HTML DOM

your regex works and so is my simple approach Response = <img alt="Wonder Woman Poster" title="Wonder Woman Poster" src="https://m.media-amazon.com/images/M/MV5BNDFmZjgyMTE[email protected]@._V1_UX182_CR0,0,182,268_AL_.jpg" /> RegExMatch(Response, "(?<=...
by AlphaBravo
29 Aug 2020, 11:04
Forum: Ask For Help
Topic: Display a message if for 5 seconds no key is pressed Topic is solved
Replies: 3
Views: 128

Re: Display a message if for 5 seconds no key is pressed Topic is solved

approach 1 : running at full speed all the time #InstallKeybdHook CheckKeyboard: while (A_TimeIdleKeyboard < 5000) continue MsgBox gosub, CheckKeyboard return approach 2 : using a timer every 50 ms #InstallKeybdHook SetTimer, CheckKeyboard, -50 return CheckKeyboard: if (A_TimeIdleKeyboard > 5000) Ms...
by AlphaBravo
29 Aug 2020, 10:46
Forum: Ask For Help
Topic: Compare Excel file and make a list of new value
Replies: 7
Views: 325

Re: Compare Excel file and make a list of new value

flyingDman , I totally agree SafeArray would be a faster approach however your code is comparing row to row - which maybe what the OP is asking for - it's just not what I understood from reading his request : (value not found in the previous file.xls) my approach finds values in newer file not foun...

Go to advanced search