Search found 16 matches

by thomastthai
14 May 2020, 18:20
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 138
Views: 80522

Re: Get the URL of the current (active) browser tab

Thank you atnbueno for this excellent function. On a Windows 10 64-bit system (with latest updates as of 2020-05-14) running both Chrome (Version 81.0.4044.138) and Internet Explorer 11, AHK Version 1.1.32.0. With both Chrome and IE running, even if I click on IE last to make it active, or with all ...
by thomastthai
14 May 2020, 17:04
Forum: Ask For Help
Topic: Curious if IfEqual Has a Bug Topic is solved
Replies: 4
Views: 334

Re: Curious if IfEqual Has a Bug Topic is solved

Thank you @boiler for clarifying. I'm learning.
by thomastthai
13 May 2020, 12:38
Forum: Ask For Help
Topic: Curious if IfEqual Has a Bug Topic is solved
Replies: 4
Views: 334

Re: Curious if IfEqual Has a Bug Topic is solved

Hi boiler ! Thanks for the reply. To check my understanding: for IfEqual, if another command follows on the SAME line, the next line is processed regardless of what happens. Following the logic of cases 1 and 2, shouldn't the following line get executed regardless if the condition is true or false f...
by thomastthai
12 May 2020, 19:10
Forum: Ask For Help
Topic: Curious if IfEqual Has a Bug Topic is solved
Replies: 4
Views: 334

Curious if IfEqual Has a Bug Topic is solved

I understand that IfEqual is deprecated. The reason I'm bringing this up is that I ran into codes from the forum from years ago. I'm trying to understand it. The code showed IfEqual command used with another command following on the same line. The line after that was indented. It looked as though th...
by thomastthai
12 May 2020, 11:22
Forum: Ask For Help
Topic: How to check if Com Object Already Exists
Replies: 3
Views: 1305

Re: How to check if Com Object Already Exists

I'm trying to learn from these codes. Would you mind explaining why there is both "While !(ie.busy)..." and "While (ie.busy)..."?
ameyrick wrote:
03 Jul 2016, 14:16

Code: Select all


IELoad(ie)
{
[b]	While !(ie.busy)
		Sleep, 100
	While (ie.busy)
		Sleep, 100[/b]
	While !(ie.document.Readystate = "Complete")
		Sleep, 100
}
by thomastthai
11 May 2020, 15:03
Forum: Ask For Help
Topic: Web Page Saves Are Different Via com Versus URLDownloadToFile Topic is solved
Replies: 2
Views: 230

Re: Web Page Saves Are Different Via com Versus URLDownloadToFile Topic is solved

Thank you @gregster for taking the time to share your thoughts. Those are excellent reminders to think about how the needle will be impacted by the changes in user interaction, iframe, and Javascript.
by thomastthai
11 May 2020, 06:01
Forum: Ask For Help
Topic: Web Page Saves Are Different Via com Versus URLDownloadToFile Topic is solved
Replies: 2
Views: 230

Web Page Saves Are Different Via com Versus URLDownloadToFile Topic is solved

I succeeded in using RegExMatch on a web page that was downloaded via URLDownloadToFile. Then I used the same needle on a haystack gotten from the same URL using: haystack := ie.document.documentElement.outerHTML That second RegExMatch failed. To my surprise, the HTML content wasn't the same! I diff...
by thomastthai
11 May 2020, 00:00
Forum: Ask For Help
Topic: How to assign value to GetElementById("user-email").value Topic is solved
Replies: 2
Views: 286

Re: How to assign value to GetElementById("user-email").value Topic is solved

Thank you gregster ! :bravo: It helps to have a fresh pair of eyes. I spent many hours double-checking typos and researching different options with event listeners. I can see how easy it was for me to overlook that typo though. Copying and pasting the id over from the web page would have been a way ...
by thomastthai
10 May 2020, 04:00
Forum: Ask For Help
Topic: How to assign value to GetElementById("user-email").value Topic is solved
Replies: 2
Views: 286

How to assign value to GetElementById("user-email").value Topic is solved

I would appreciate help to find out why the values assigned to these input elements aren't getting updated? ieVisible := True ie := ComObjCreate("InternetExplorer.Application") ie.visible := ieVisible ; Show Internet Explorer window? ie.ToolBar := false ie.Navigate("https://cgcookie.com/login") ; wa...
by thomastthai
10 May 2020, 02:26
Forum: Ask For Help
Topic: Right Mouse Click on an Element
Replies: 0
Views: 199

Right Mouse Click on an Element

I am able to use ComObjCreate("InternetExplorer.Application") to log into the web site and submit a form etc. Additionally, I've been able to use OCR to navigate on a web site. CG Broken Link for safety Cookie uses Wistia video player. Right mouse clicking on the video player pops up a menu. Left mo...
by thomastthai
06 May 2020, 13:05
Forum: Ask For Help
Topic: Is there a simple and reliable way to process JSON data? Topic is solved
Replies: 82
Views: 12382

Re: Is there a simple and reliable way to process JSON data? Topic is solved

Thank you @teadrinker and @Chunjee! I learn something new everyday.
by thomastthai
06 May 2020, 11:34
Forum: Ask For Help
Topic: Is there a simple and reliable way to process JSON data? Topic is solved
Replies: 82
Views: 12382

Re: Is there a simple and reliable way to process JSON data? Topic is solved

Thank you teadrinker for taking the time to respond! With regard to not using the double quotes around the value and changing: obj.key3[4] := "{'key34': 'value34'}" to obj.key3[4] := {'key34': 'value34'} I would get an error about quote marks being required, which makes sense. JSON-AHK error quote m...
by thomastthai
05 May 2020, 17:27
Forum: Ask For Help
Topic: Is there a simple and reliable way to process JSON data? Topic is solved
Replies: 82
Views: 12382

Re: Is there a simple and reliable way to process JSON data? Topic is solved

Thank you teadrinker for your JSON class. It was helpful. I have a few questions or comments with regard to the included code below with comments. When I added key33 using "key3[10]", SetKey() placed it at slot #11. That makes sense since an array starts at 0. When I added key34 using obj.key3[4], i...
by thomastthai
28 Mar 2020, 20:46
Forum: Ask For Help
Topic: Starting a function automatically at script startup
Replies: 2
Views: 246

Re: Starting a function automatically at script startup

Thank you @TAC109 :bravo: for taking the time to highlight the answer! I must have missed that one sentence when I read the static page in the documentation.
by thomastthai
28 Mar 2020, 16:50
Forum: Ask For Help
Topic: Starting a function automatically at script startup
Replies: 2
Views: 246

Starting a function automatically at script startup

I came across a code by lexikos to have a function called automatically upon the script startup. I read about functions from the manual and did some Googling. Unfortunately, I'm still at a loss for why this works. Would someone mind help explain? init_this_file() { static _ := init_this_file() /* Th...
by thomastthai
22 Mar 2020, 16:43
Forum: Ask For Help
Topic: Parsing Web Page Source That Shows Up In Chrome Inspector
Replies: 1
Views: 213

Parsing Web Page Source That Shows Up In Chrome Inspector

I'm working on parsing a web page for this pattern ' id="lesson-2674" ' where 2674 could be any number. The challenge I'm encountering is these set of patterns only appear when I view the elements via Chrome's Inspector in Developer mode. When viewing the page source alone, I don't see these element...

Go to advanced search