| View previous topic :: View next topic |
| Author |
Message |
Web->Ahk Guest
|
Posted: Tue Mar 09, 2010 12:12 pm Post subject: Can a website trigger an AHK script? |
|
|
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
|
Posted: Tue Mar 09, 2010 12:25 pm Post subject: |
|
|
| What for? |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
Posted: Tue Mar 09, 2010 12:25 pm Post subject: |
|
|
"kind of new" suggests that you are already familiar with the AutoHotkey forum which means you know there is a search function This question was asked just last week if I remember correctly. Search for it  _________________ AHK Wiki FAQ
TF : Text files & strings lib, TF Forum |
|
| Back to top |
|
 |
Web->Ahk Guest
|
Posted: Tue Mar 09, 2010 6:25 pm Post subject: |
|
|
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
|
Posted: Tue Mar 09, 2010 6:57 pm Post subject: |
|
|
| perhaps this thread might help ... |
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
Posted: Tue Mar 09, 2010 8:43 pm Post subject: |
|
|
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 |
|
 |
Carcophan
Joined: 24 Dec 2008 Posts: 1308 Location: :noitacoL
|
Posted: Tue Mar 09, 2010 8:46 pm Post subject: |
|
|
| 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 |
|
 |
flyingDman
Joined: 27 Feb 2009 Posts: 690 Location: Burbank, California
|
Posted: Tue Mar 09, 2010 9:42 pm Post subject: |
|
|
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 |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
|
| Back to top |
|
 |
|