AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can a website trigger an AHK script?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Web->Ahk
Guest





PostPosted: Tue Mar 09, 2010 12:12 pm    Post subject: Can a website trigger an AHK script? Reply with quote

Was just wondering if it is at all possible to run a script from a webpage. Sorry kind of new..

Thanks
Back to top
Murx
Guest





PostPosted: Tue Mar 09, 2010 12:25 pm    Post subject: Reply with quote

What for?
Back to top
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Tue Mar 09, 2010 12:25 pm    Post subject: Reply with quote

"kind of new" suggests that you are already familiar with the AutoHotkey forum which means you know there is a search function Wink This question was asked just last week if I remember correctly. Search for it Wink
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Web->Ahk
Guest





PostPosted: Tue Mar 09, 2010 6:25 pm    Post subject: Reply with quote

There was nothing on this particular subject.

All I want is a webpage opened in IE or FF to launch an AHK script on my computer.

Hope this makes sense.
Back to top
Guest






PostPosted: Tue Mar 09, 2010 6:57 pm    Post subject: Reply with quote

perhaps this thread might help ...
Back to top
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Tue Mar 09, 2010 8:43 pm    Post subject: Reply with quote

This will launch a script if a the site is loaded in Firefox or IE that does not use COM.
It uses browser errorlevel combined with regex to resolve the condition.
Still quite complex if you've just started.
Code:
; Temporarily removed until further notice..
This can be condensed and will faster when the lines, functions and timers with 'This can be removed!' are removed.

hth

Just found out that this can be used for viruses! If this was posted by Jake (my little brother) I'm going to kick your ass you little prick!
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞


Last edited by TLM on Tue Mar 09, 2010 9:23 pm; edited 2 times in total
Back to top
View user's profile Send private message
Carcophan



Joined: 24 Dec 2008
Posts: 1308
Location: :noitacoL

PostPosted: Tue Mar 09, 2010 8:46 pm    Post subject: Reply with quote

Quote:
to run a script from a webpage


Another option:

I have stored a .AHK file on a MicroSoft SharePoint site, and you can click and run it directly from the SP page itself.


Haven't tried with anything other than sharepoint, but if you can get/make a sharepoint site/portal, i know from experience that direct links (like in an email) can run an AHK script through SP.
Back to top
View user's profile Send private message
flyingDman



Joined: 27 Feb 2009
Posts: 690
Location: Burbank, California

PostPosted: Tue Mar 09, 2010 9:42 pm    Post subject: Reply with quote

I like the sharepoint idea, but believe this is not what Web->Ahk is looking for. If I am dot mistaken, Web->Ahk wants a script to be launched if a specific website is opened. I.e. if, say, Gmail is opened, some script is triggered. If I misunderstood, skip the rest.

If not here is a working example:
Code:
#NoEnv
#SingleInstance Force
top:
WinWait, Gmail
SoundPlay *-1                        ;or lauch something else
loop
{
IfWinExist, Gmail                      ;if Gmail is open sleep 2 seconds
{
sleep, 2000
continue
}                           
gosub, top                                                   ;if Gmail has closed, reload
}


the script is "reloaded" if gmail is closed and ready to be triggered again if gmail is opened again.
Don't know what it could be used for, but...
_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Tue Mar 09, 2010 11:04 pm    Post subject: Reply with quote

Guys, I'm sorry, look like this particular thread was my fault.
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group