Search found 1194 matches

by FanaticGuru
Yesterday, 18:57
Forum: Ask For Help
Topic: Using AHK and Excel's COM
Replies: 1
Views: 26

Re: Using AHK and Excel's COM

Hi folks, I've been dinging around with COM in Excel for the last couple of weeks and the more I learn, the more complex and difficult each problem I am trying to solve becomes. I've looked at countless forum posts on COM in Excel, many with varying techniques to do essentially the same thing. Seem...
by FanaticGuru
18 Oct 2018, 14:39
Forum: Ask For Help
Topic: From Notepad to Word .doc and back Topic is solved
Replies: 7
Views: 123

Re: From Notepad to Word .doc and back Topic is solved

An interesting idea to use Word to spell check in other applications. Here is my take on it. OnExit, Word_Shutdown #F12:: Clipboard := "" Send ^c ClipWait if !IsObject(wdApp) wdApp := ComObjCreate("Word.Application") if !IsObject(wdDoc) wdDoc := wdApp.Documents.Add wdDoc.Content.Text := Clipboard No...
by FanaticGuru
17 Oct 2018, 17:18
Forum: Ask For Help
Topic: Value of a Excel cell in selected row
Replies: 4
Views: 73

Re: Value of a Excel cell in selected row

#SingleInstance, Force oExcel := ComObjActive("Excel.Application") RegExMatch(oExcel.ActiveCell.Address, "\d+", Row) Value := oExcel.Range("B" Row).Value URL := oExcel.Range("C" Row).Text MsgBox, % Value Run, % URL You can avoid the string manipulation like this: oExcel := ComObjActive("Excel.Appli...
by FanaticGuru
17 Oct 2018, 12:52
Forum: Scripts and Functions
Topic: [Library] Sift - Fuzzy Search by RegEx and Ngram
Replies: 14
Views: 3764

Re: [Library] Sift - Fuzzy Search by RegEx and Ngram

There's no interference with other programs and certainly no negative consequences. That is not true. Two quotes from the documentation: Determines how fast a script will run (affects CPU utilization). For example, on most systems a setting of 10ms will prevent the script from using any more than 5...
by FanaticGuru
11 Oct 2018, 12:53
Forum: Ask For Help
Topic: Excell Cell offset
Replies: 4
Views: 76

Re: Excell Cell offset

Hello, Thank you for the help here. Your script ran fine when I tab through the cells without entering data but when I add data and then try tabbing to the next cell I get a error message. "Error 0X8001000 - Call was rejected by callee. Specifically: ActiveCell. Then there is a arrow pointing to th...
by FanaticGuru
10 Oct 2018, 15:02
Forum: Ask For Help
Topic: Sørensen–Dice coefficient Topic is solved
Replies: 10
Views: 129

Re: Sørensen–Dice coefficient Topic is solved

Normally I would use the Levenshtein Distance. For this one I would probably collect the bigrams of both strings in seperate arrays and then compare the arrays. sharedBigrams := 0 for bigram, _ in bigramsOfFirstWord { if bigramsofSecondWord.hasKey(bigram) { sharedBigrams++ } } If people want to pla...
by FanaticGuru
10 Oct 2018, 13:31
Forum: Ask For Help
Topic: Excell Cell offset
Replies: 4
Views: 76

Re: Excell Cell offset

Code: Select all

$Tab::
	xlApp := ComObjActive("Excel.Application")
	if (xlApp.ActiveCell.Column = 7)
		xlApp.ActiveCell.Offset(1,-3).Activate
	else
		Send {Tab}
return
FG
by FanaticGuru
09 Oct 2018, 22:40
Forum: Ask For Help
Topic: How to check focused control changes with OnMessage() rather than gLabel SetTimer? Topic is solved
Replies: 14
Views: 231

Re: How to check focused control changes with OnMessage() rather than gLabel SetTimer? Topic is solved

After testing your great options tonight, this is a comparative test simplifying both methods side by side. To compare one or the other, all you have to do is comment out either the DllCall or the OnMessage() I still don't know which one of the two I prefer but for your information, here is the com...
by FanaticGuru
09 Oct 2018, 19:05
Forum: Ask For Help
Topic: AHK To Work IN-GAME Only
Replies: 24
Views: 435

Re: AHK To Work IN-GAME Only

If you want to send commands to another window than the one that is currently active then you need ControlSend.

This will allow you to work in one window while AHK sends commands to another window.

FG
by FanaticGuru
09 Oct 2018, 11:26
Forum: Ask For Help
Topic: How to check focused control changes with OnMessage() rather than gLabel SetTimer? Topic is solved
Replies: 14
Views: 231

Re: How to check focused control changes with OnMessage() rather than gLabel SetTimer? Topic is solved

Microsoft docs: Message Source wParam (high word) wParam (low word) lParam Control Control-defined notification code Control identifier Handle to the control window Is the wParam Low Word (control identifier) any useful? Would you be able to use any of these without defining hWnd and only using GUI...
by FanaticGuru
08 Oct 2018, 21:46
Forum: Ask For Help
Topic: How to check focused control changes with OnMessage() rather than gLabel SetTimer? Topic is solved
Replies: 14
Views: 231

Re: How to check focused control changes with OnMessage() rather than gLabel SetTimer? Topic is solved

I can't find what Windows Message is relevant to checking for currently focused control in the active window, and if there is such an option. So for now I am using a SetTimer gLabel repeating every 30ms to do that. But how would you use OnMessage() to do this instead of a Timer Loop? Below is an ex...
by FanaticGuru
05 Oct 2018, 17:39
Forum: Ask For Help
Topic: Txt file containing HTML code to extract data from Excel.
Replies: 3
Views: 91

Re: Txt file containing HTML code to extract data from Excel.

Assuming the text is proper html then you can put the html code into an HTML object and then use DOM to get information from the table the same as you would with a webpage. Below is an example: html = (join <table><tr style="background-color:#F3F2F2;"> <td><a href="javascript:void(0);" data-id="0370...
by FanaticGuru
05 Oct 2018, 15:17
Forum: Ask For Help
Topic: Is this general idea possible?
Replies: 7
Views: 226

Re: Is this general idea possible?

This is not exactly what you need but it is an example of using WinHttpRequest to write an HTML object that you can then use DOM to get information from that HTML object. ; create blank HTML file object oHTML := ComObjCreate("HTMLfile") ; Get the HTML text from a Http and put into the HTML object oH...
by FanaticGuru
04 Oct 2018, 14:27
Forum: Ask For Help
Topic: Excel Spreadsheet automation...please help! Topic is solved
Replies: 7
Views: 161

Re: Excel Spreadsheet automation...please help! Topic is solved

Here is my issue. I have a spreadsheet put into the same directory every day that is named ML NORTHEAST_FOODS_*.xls where the * references an 8 digit date. Today, it was 20181003. I also cannot get the script to intelligently pull the filename from the directory since the filename changes every day...
by FanaticGuru
03 Oct 2018, 12:06
Forum: Ask For Help
Topic: Is this general idea possible?
Replies: 7
Views: 226

Re: Is this general idea possible?

Here is a start toward this project. #Include, <Gdip> ;Thanks to Tic https://autohotkey.com/boards/viewtopic.php?t=6517 Download: Gdip_All.ahk ; Open webpage in IE URL = http://www.amazon.in/dp/B07HLKV538 WB := ComObjCreate("InternetExplorer.Application") WB.Visible := true Hwnd := WB.Hwnd WB.Naviga...
by FanaticGuru
02 Oct 2018, 12:18
Forum: Ask For Help
Topic: Excel - Replacing specific color of whole sheet? Topic is solved
Replies: 6
Views: 125

Re: Excel - Replacing specific color of whole sheet? Topic is solved

World-class! :bravo: I've mixed your scripts together and added some other things. The script now checks the worksheet tab color and applies it to all font colors + border colors and shape colors. Additionally it selects the next worksheet and repeats the operation until the sheet "END" has been re...
by FanaticGuru
01 Oct 2018, 17:22
Forum: Ask For Help
Topic: Excel - Replacing specific color of whole sheet? Topic is solved
Replies: 6
Views: 125

Re: Excel - Replacing specific color of whole sheet? Topic is solved

Here is an example to turn all red lines bluish. #F7:: xlApp := ComObjActive("Excel.Application") for xlShape in xlApp.ActiveSheet.Shapes if (xlShape.Line.ForeColor.RGB = 0x0000FF) xlShape.Line.ForeColor.RGB := 0xFFD700 return This should be relatively quick as there are typically not many shapes to...
by FanaticGuru
01 Oct 2018, 17:01
Forum: Ask For Help
Topic: Excel - Replacing specific color of whole sheet? Topic is solved
Replies: 6
Views: 125

Re: Excel - Replacing specific color of whole sheet? Topic is solved

Below is an example that shows more easily how to loop through all of the used cells in an Excel sheet. #F8:: xlApp := ComObjActive("Excel.Application") xlApp.ScreenUpdating := false for xlCell in xlApp.ActiveSheet.UsedRange.Cells { for xlBorder in xlCell.Borders if (xlBorder.Color = 0x0000FF) { xlB...
by FanaticGuru
01 Oct 2018, 14:28
Forum: Ask For Help
Topic: copy the selection from webpage and pasting in excel Topic is solved
Replies: 12
Views: 281

Re: copy the selection from webpage and pasting in excel Topic is solved

Hi FG, I need a help , in the below code there is an error when i press 1 it paste the data in first row when i press 2 it paste in the second row ! . this happens when i added a new module to bring the cell to the first column empty row . if i remove this module its working fine . and i need a exa...

Go to advanced search