Search found 62 matches

by Stavencross
22 Jan 2019, 10:47
Forum: Ask For Help
Topic: [SOLVED] WebApp.Ahk crash on key spam
Replies: 3
Views: 212

Re: [SOLVED] WebApp.Ahk crash on key spam

I finally solved this issue (2 yrs later) There is a function SetWBClientSite() at the end, I had to comment the if() block out. It looks like it was maybe sending out to many DLL calls due to the spam? I modified the func to this: SetWBClientSite() { interfaces := { (Join, IOleClientSite: [0,3,1,0,...
by Stavencross
20 Jan 2019, 09:45
Forum: Scripts and Functions
Topic: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!
Replies: 131
Views: 29066

Re: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!

Thanks for the library GeekDude! My question: Can I run multiple instances of this class? I would like to have many controllable windows open at the same time. I tried this, but failed. #include <External\Chrome> ; Create an instance of the Chrome class using ; the folder ChromeProfile to store the...
by Stavencross
25 Sep 2018, 13:31
Forum: Tips and Tricks
Topic: COM Object method .Quit() not killing process
Replies: 0
Views: 553

COM Object method .Quit() not killing process

I spent about 6 hours this week struggling with powerpoint not quitting when I was calling the .Quit() method. I stumbled across : https://stackoverflow.com/questions/3197263/application-quit-method-failing-to-clear-process which lead me to https://support.microsoft.com/en-us/help/317109/office-appl...
by Stavencross
21 Sep 2018, 09:04
Forum: Tips and Tricks
Topic: [GUI] Use HTML and CSS for your GUIs!
Replies: 118
Views: 56757

Re: [GUI] Use HTML and CSS for your GUIs!

Yes Kczx3 was correct. Yesterday I redesigned the whole 1000 line function to utilize a GUI instead for control instead of messagebox. that fixed everything
by Stavencross
21 Sep 2018, 09:00
Forum: Scripts and Functions
Topic: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!
Replies: 131
Views: 29066

Re: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!

And as I wear out my welcome here, I think I've found a bug of some type. After I make a dozen or so DOM JS calls, AHK locks up and this is what I'm seeing for output: 037: if i := InStr("{[", ch) 047: if InStr("}]", ch) 049: ObjRemoveAt(stack, 1) 050: next := stack[1]==tree ? "" : is_arr[stack[1]]...
by Stavencross
19 Sep 2018, 14:13
Forum: Ask For Help
Topic: PowerPoint COM Add/Remove Slide event
Replies: 3
Views: 182

PowerPoint COM Add/Remove Slide event

Good afternoon! I'm trying to connect my script to the Powerpoint New Slide event. I tried applying my post:https://autohotkey.com/boards/viewtopic.php?p=238437#p238437, but I couldn't figure it out. When a user adds a new slide to the presentation, I'd like to have a class that loops through the en...
by Stavencross
13 Sep 2018, 16:15
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Re: Capture SendMail event in Outlook COM

Your example works perfectly. However, when I drop the mail creation into a function, the class is no longer called? #Persistent makeanemail() makeanemail() { static olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newM...
by Stavencross
13 Sep 2018, 16:10
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Re: Capture SendMail event in Outlook COM

Before I did not see much point in wrapping it in a class but this is pretty slick for limiting the scope of variables to the method/function. In the past, I have taken the lazy approach and just used a global variable to get info into the event function but this is cooler. I will remember this for...
by Stavencross
13 Sep 2018, 15:48
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Re: Capture SendMail event in Outlook COM

#Persistent olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newMail.Display ; you can pass params when creating the object MailEventsObj := new MailItemEvents("samesfordfd") ; you can also add to the object after it is...
by Stavencross
13 Sep 2018, 15:04
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Re: Capture SendMail event in Outlook COM

#Persistent olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newMail.Display ; you can pass params when creating the object MailEventsObj := new MailItemEvents("samesfordfd") ; you can also add to the object after it is...
by Stavencross
13 Sep 2018, 14:31
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Re: Capture SendMail event in Outlook COM

#Persistent olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newMail.Display ; Connect to newMail events ComObjConnect(newMail, new MailItemEvents) return class MailItemEvents { ; MailItem.Send Event (Outlook) ; https:/...
by Stavencross
13 Sep 2018, 13:37
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Re: Capture SendMail event in Outlook COM

#Persistent olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newMail.Display ; Connect to newMail events ComObjConnect(newMail, new MailItemEvents) return class MailItemEvents { ; MailItem.Send Event (Outlook) ; https:/...
by Stavencross
13 Sep 2018, 10:51
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 307

Capture SendMail event in Outlook COM

I'm trying to figure out how to popup a messagebox when a user clicks Send in an email that was created via outlook COM MessageSubject := "Hello World!" CCAddress := "noreply@noreply.com" ol := ComObjCreate("Outlook.Application") ns := ol.getNamespace("MAPI") ns.logon("","",true,false) newMail := ol...
by Stavencross
28 Jun 2018, 09:09
Forum: Scripts and Functions
Topic: Remote AHK script execution via Chrome.AHK
Replies: 0
Views: 421

Remote AHK script execution via Chrome.AHK

Previously, I had posted https://autohotkey.com/boards/viewtopic.php?f=6&t=49331&p=219189#p219189 about creating a webapp with chrome.ahk. Today I wondered "Could I have a page on my webserver that if I visit it from inside my chrome.ahk app, it would allow the server to remotely execute my ahk scri...
by Stavencross
20 May 2018, 11:18
Forum: Ask For Help
Topic: Opening URL loses focus on browser window
Replies: 5
Views: 247

Re: Opening URL loses focus on browser window

You're opening the url in the foreground causing it to take focus. Look for a command line switch that opens the Firefox tab in the background.

I did a Google search and found the below, but I'm on mobile and couldn't test.

Code: Select all

 
Run, firefox.exe "http://www.google.com/" &
by Stavencross
20 May 2018, 09:44
Forum: Scripts and Functions
Topic: Building a web app GUI with chrome.ahk example
Replies: 0
Views: 441

Building a web app GUI with chrome.ahk example

After talking a lot with GeekDude who made the Chrome.ahk library, I wanted to post a super simple example to show how to use chrome.ahk to build a HTML GUI. This example is extremely simple, and shows how to execute functions based on a javascript callback function. All gratitude should go to Geekd...
by Stavencross
20 May 2018, 08:04
Forum: Ask For Help
Topic: [SOLVED] WebApp.Ahk crash on key spam
Replies: 3
Views: 212

Re: WebApp.Ahk crash on key spam

Although I was unable to fix this, I migrated to using geekdudes Chrome.ahk to run my webapp, and the issue isn't present.
by Stavencross
18 May 2018, 12:59
Forum: Scripts and Functions
Topic: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!
Replies: 131
Views: 29066

Re: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!

To start chrome without all the UI buttons, instantiate the class like this
ChromeInst := new Chrome("ChromeProfile", "--app=https://autohotkey.com/")
by Stavencross
18 May 2018, 11:36
Forum: Tips and Tricks
Topic: [GUI] Use HTML and CSS for your GUIs!
Replies: 118
Views: 56757

Re: [GUI] Use HTML and CSS for your GUIs!

Awesome :+1: Some of the functions I use pop up a message box that pauses the script while a user works in PowerPoint. However, it seems that webapp.ahk will be looping in the background, once it gets to 5 million loops, internet explorer pops a message box complaining about an unresponsive script ...
by Stavencross
18 May 2018, 11:21
Forum: Ask For Help
Topic: [SOLVED] WebApp.Ahk crash on key spam
Replies: 3
Views: 212

Re: WebApp.Ahk crash on key spam

I tried to add a text-area to the AHK installer that I remember webapp.ahk was based on, I am still able to reproduce the error there =/.

Go to advanced search