 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Download Barometer |
| That's BoBolicous ! |
|
100% |
[ 1 ] |
| Nice, but ... (OK - I'll post it - once I've understood the meaning of this poll!) |
|
0% |
[ 0 ] |
| Before I'd copy this, I'd marry Britney Spears! |
|
0% |
[ 0 ] |
| Well, you didn't steal the majority of the code. Fair enough. |
|
0% |
[ 0 ] |
| OMG! You must be really, really bored ... |
|
0% |
[ 0 ] |
| UselessToolnameAlert |
|
0% |
[ 0 ] |
|
| Total Votes : 1 |
|
| Author |
Message |
BoBo
Joined: 23 Apr 2007 Posts: 9
|
Posted: Tue Sep 02, 2008 4:54 pm Post subject: FSC - Forum Script Copier [BoBo] |
|
|
| Code: |
/*
AutoHotkey Version: 1.0.47.06
Language: English
Platform: WIN_XP
Author: BoBo/tank
Script Function: Create a script based on a copy from the AutoHotkey-Forum.
Handling: Pressing the ALT-key while left-clicking a Forum-posts (mini) icon ...
will detect its assigned PostID. If you'll copy a posts script (within 30 seconds time, ...
using the forums 'script copy' function, a local copy of the script will be created.
For reference reasons the created file contains the PostID and a timestamp within its filename.
Additionaly the PostID (its origin path) and an advise regarding an added Hotkey is given in the header section of the created file.
The added hotkey (ALT+W) should give direct access to the origin post at the forum.
That might make sense if you wanna respond after testing.
*/
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
SetTitleMatchMode, 2
SetTimer, DetectCopyActivity, 500
SetTimer, DetectCopyActivity, Off
!LButton::
MouseGetPos,,, hwnd
WinGetTitle,title, ahk_id %hwnd%
MsgBox,% title
StatusBarGetText, PostURI, 1, ahk_id %hwnd% ; get the posts ID
SoundBeep
If InStr(PostURI,"http://de.autoHotkey.com") ; identify if working at the US/UK or the German AHK-forum
Msg := "Code wurde in Zwischenablage kopiert."
If InStr(PostURI,"http://www.autoHotkey.com")
Msg := "Code copied to clipboard."
ClipBoard =
SetTimer, DetectCopyActivity, On
Return
DetectCopyActivity:
NonActivityCount++
IfWinExist, Internet Explorer, %Msg%
{
Sleep, 200
ControlSend, Button1, a, Internet Explorer, %Msg%
Sleep, 200
ControlSend, Button1, {ENTER}, Internet Explorer, %Msg%
SplitPath, PostURI,,, POSTID ; extract PostID from PostURI
StringSplit, PostID, PostURI,#
FileName := "AHKForumPost_" PostID2 "_" A_Now ".ahk" ; set the output name, here: AHKForumPost_<origin number of the post>_<timestamp>.ahk
FileAppend,
(LTrim
;
; This script was copied from here: %PostURI%
; A hotkey (ALT+W) to easily connect directly to that post is added at the bottom of this file.
;
%ClipBoard%
!w::Run, "%PostURI%",, Max
)
, %A_ScriptDir%\%FileName% ; create the file
Run, Edit %FileName%, %A_ScriptDir%, OutputVarPID ; run the file
SetTimer, DetectCopyActivity, Off
NonActivityCount = 0
Return
}
If NonActivityCount = 60
{
SoundBeep
ToolTip, Wait period expired! Bye.
Sleep, 2500
ToolTip
POSTURI =
SetTimer, DetectCopyActivity, Off
}
Return
!s::Run, "%A_AhkPath%" "%A_ScriptDir%\%FileName%",,, OutputVarPID ; ALT+S start the copied/created script
!x::Process, Close, %OutputVarPID% ; ALT+X exit the (created and afterwards) executed script |
Hope that makes sense to you.
If you can' t stand such a noobish attempt, feel free to impress us with a RegEx-, DllCall()-, HttpQuery()-, <your magic command here>-release.
Have fun.
06/09/2008: script has been edited for [that] reason. Thx tank
[BoBoPromo]
To promote your AHK-DIY-GUIs at the forum ...
To support your favourite noob with an image instead of confusing rocket science statements ...
Why not draw a picture? Or even better use [FSB] ?
[/BoBoPromo]
Keywords: Forum - BoBo - BoBo² - test - test script - script reference - BB Code - phpBB
Last edited by BoBo on Tue Sep 09, 2008 4:07 pm; edited 8 times in total |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Sep 02, 2008 5:51 pm Post subject: |
|
|
| What mini icon? =P |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Tue Sep 02, 2008 5:53 pm Post subject: |
|
|
@ to noobs it may concern
once you copied the above script, and created a valid ahk file from it, you can use it that way ...
1..2..3.. Ladies & gentlemen .. start the script!!
a) position your mouse over the tiny little 'document' icon which you can see at the header section of a post (indeed the one in the red circle)
b) now press ALT + LButtoon (that's your left mouse button) together. You should hear a beep. (otherwise your speakers are off, broken, or your surname is Beethoven).
c) now click the Copy 'button' above the scripts window (yes, the one in the blue circle). Boom --- a confirmation pop up box appears and, - will get closed.
If the copied script will open instantly within your local editor, congrats you made it! If not ... YOU ARE TO SLOW!
The copy event has to be done within 30 seconds after you 'ALT+LButton'-clicked the posts icon.
Noobs unite!  |
|
| Back to top |
|
 |
trik
Joined: 15 Jul 2007 Posts: 1320
|
Posted: Tue Sep 02, 2008 9:29 pm Post subject: |
|
|
It's nice to see ol' BoBo back with a simple but useful script.  _________________ Religion is false. >_> |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Tue Sep 02, 2008 9:44 pm Post subject: |
|
|
Thx. TBH, it was tougher not to post all my useless scripts  |
|
| Back to top |
|
 |
thepitster
Joined: 01 Sep 2008 Posts: 4
|
Posted: Sat Sep 06, 2008 6:32 pm Post subject: |
|
|
| is this by some chance vista compatible if not then i get nothing with i follow the instructions, i hear beeps and im clicking the right areas |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sat Sep 06, 2008 9:22 pm Post subject: |
|
|
BoBo
while i could have went for a COM approach it was easier to fix the file as such
| Code: | /*
AutoHotkey Version: 1.0.47.06
Language: English
Platform: WIN_XP
Author: BoBo
Script Function: Create a script based on a copy from the AutoHotkey-Forum.
Handling: Pressing the ALT-key while left-clicking a Forum-posts (mini) icon ...
will detect its assigned PostID. If you'll copy a posts script (within 30 seconds time, ...
using the forums 'script copy' function, a local copy of the script will be created.
For reference reasons the created file contains the PostID and a timestamp within its filename.
Additionaly the PostID (its origin path) and an advise regarding an added Hotkey is given in the header section of the created file.
The added hotkey (ALT+W) should give direct access to the origin post at the forum.
That might make sense if you wanna respond after testing.
*/
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
SetTitleMatchMode, 2
SetTimer, DetectCopyActivity, 500
SetTimer, DetectCopyActivity, Off
!LButton::
MouseGetPos,,, hwnd
WinGetTitle,title, ahk_id %hwnd%
StatusBarGetText, PostURI, 1,ahk_id %hwnd% ; get the posts ID
SoundBeep
If InStr(PostURI,"http://de.autoHotkey.com") ; identify if working at the US/UK or the German AHK-forum
Msg := "Code wurde in Zwischenablage kopiert."
If InStr(PostURI,"http://www.autoHotkey.com")
Msg := "Code copied to clipboard."
msg1:="Do you want to allow this webpage to access your Clipboard?"
ClipBoard =
SetTimer, DetectCopyActivity, On
Return
DetectCopyActivity:
NonActivityCount++
IfWinExist, Internet Explorer, %Msg%
{
IfWinExist,Internet Explorer,%msg1%
{
SendInput,!a
ControlSend, Button2, {ENTER}, Internet Explorer, %Msg%
WinWaitClose, Internet Explorer,%msg1%
}
Sleep, 200
ControlSend, Button1, {ENTER}, Internet Explorer, %Msg%
WinWaitClose, Internet Explorer, %Msg%
SplitPath, PostURI,,, POSTID ; extract PostID from PostURI
StringSplit, PostID, PostURI,#
FileName := "AHKForumPost_" PostID2 "_" A_Now ".ahk" ; set the output name, here: AHKForumPost_<origin number of the post>_<timestamp>.ahk
FileAppend,
(LTrim
;
; This script was copied from here: %PostURI%
; A hotkey (ALT+W) to easily connect directly to that post is added at the bottom of this file.
;
%ClipBoard%
!w::Run, "%PostURI%",, Max
)
, %A_ScriptDir%\%FileName% ; create the file
Run, Edit %FileName%, %A_ScriptDir%, OutputVarPID ; run the file
SetTimer, DetectCopyActivity, Off
NonActivityCount = 0
Return
}
If NonActivityCount = 60
{
SoundBeep
ToolTip, Wait period expired! Bye.
Sleep, 2500
ToolTip
POSTURI =
SetTimer, DetectCopyActivity, Off
}
Return
!s::Run, "%A_AhkPath%" "%A_ScriptDir%\%FileName%",,, OutputVarPID ; ALT+S start the copied/created script
!x::Process, Close, %OutputVarPID% ; ALT+X exit the (created and afterwards) executed script |
it will work in both ie6 and 7 which should solve the vista problem described earlier ie7 shows windows internet explorer not microsoft so i just toook out the microsoft and added a step to deal wtih the possible allow access prompt that comes
peice _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Last edited by tank on Sat Sep 06, 2008 11:20 pm; edited 2 times in total |
|
| Back to top |
|
 |
thepitster
Joined: 01 Sep 2008 Posts: 4
|
Posted: Sat Sep 06, 2008 9:29 pm Post subject: |
|
|
| now that did it thnx tank |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Sep 09, 2008 11:39 pm Post subject: |
|
|
One Word WOW
Always wanted too created some like this myself only I wanted a hotkey that created some temp.ahk and execute it imediatly from the clipboard.
Gosh want can I say your the greatest keep up the good work. |
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Mon May 31, 2010 4:26 pm Post subject: |
|
|
Just realized, when reading your post that I only have a code expand link in : Opera, firefox and chromium.
So I opened IE and there I have a copy link. | BoBo² wrote: | @ to noobs it may concern
once you copied the above script, and created a valid ahk file from it, you can use it that way ...
1..2..3.. Ladies & gentlemen .. start the script!!
a) position your mouse over the tiny little 'document' icon which you can see at the header section of a post (indeed the one in the red circle)
b) now press ALT + LButtoon (that's your left mouse button) together. You should hear a beep. (otherwise your speakers are off, broken, or your surname is Beethoven).
c) now click the Copy 'button' above the scripts window (yes, the one in the blue circle). Boom --- a confirmation pop up box appears and, - will get closed.
If the copied script will open instantly within your local editor, congrats you made it! If not ... YOU ARE TO SLOW!
The copy event has to be done within 30 seconds after you 'ALT+LButton'-clicked the posts icon.
Noobs unite!  |
|
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Mon May 31, 2010 4:45 pm Post subject: |
|
|
Thanks sinkfaze
| sinkfaze wrote: | | That's because of the forum software issues detailed here. |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|