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 

Function/Variable Linker (For the forums)

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Slanter



Joined: 28 May 2008
Posts: 739
Location: Minnesota, USA

PostPosted: Wed Aug 13, 2008 8:11 pm    Post subject: Function/Variable Linker (For the forums) Reply with quote

This is a script I just threw together that will replace names of functions and built-in variables with links to the online documentation. For example, when I type MsgBox it replaces it with MsgBox.

Toggles suspend with the insert key, suspends when you type [ code] and un-suspends when you type [ /code].

*Note - I left out the special loops because the didn't have a standard page (yes, I'm lazy, might add them later). I also left out the "If var" commands because I didn't feel like including them Razz
Code:
SendMode, Input

; ----------
; Toggle Keys
; ----------
~Insert::Suspend
:*b0?:[code]::
   Suspend On
Return
:*b0?:[/code]::
   Suspend Off
Return

; ----------
; Built in variables
; ----------
::A_AhkPath::
::A_AhkVersion::
::A_AppData::
::A_AppDataCommon::
::A_AutoTrim::
::A_BatchLines::
::A_CaretX::
::A_CaretY::
::A_ComputerName::
::A_ControlDelay::
::A_Cursor::
::A_DD::
::A_DDD::
::A_DDDD::
::A_DefaultMouseSpeed::
::A_Desktop::
::A_DesktopCommon::
::A_DetectHiddenText::
::A_DetectHiddenWindows::
::A_EndChar::
::A_EventInfo::
::A_ExitReason::
::A_FormatFloat::
::A_FormatInteger::
::A_Gui::
::A_GuiControl::
::A_GuiControlEvent::
::A_GuiEvent::
::A_GuiHeight::
::A_GuiWidth::
::A_GuiX::
::A_GuiY::
::A_Hour::
::A_IconFile::
::A_IconHidden::
::A_IconNumber::
::A_IconTip::
::A_Index::
::A_IPAddress::
::A_IsAdmin::
::A_IsCompiled::
::A_IsSuspended::
::A_KeyDelay::
::A_Language::
::A_LastError::
::A_LineNumber::
::A_LoopField::
::A_LoopFileAttrib::
::A_LoopFileDir::
::A_LoopFileExt::
::A_LoopFileLongPath::
::A_LoopFileName::
::A_LoopFileShortName::
::A_LoopFileShortPath::
::A_LoopFileSize::
::A_LoopFileSizeKB::
::A_LoopFileSizeMB::
::A_LoopFileTimeAccessed::
::A_LoopFileTimeCreated::
::A_LoopFileTimeModified::
::A_LoopReadLine::
::A_LoopRegKey::
::A_LoopRegName::
::A_LoopRegSubKey::
::A_LoopRegTimeModified::
::A_LoopRegType::
::A_MDay::
::A_Min::
::A_MM::
::A_MMM::
::A_MMMM::
::A_Mon::
::A_MouseDelay::
::A_MSec::
::A_MyDocuments::
::A_Now::
::A_NowUTC::
::A_NumBatchLines::
::A_OSType::
::A_OSVersion::
::A_PriorHotkey::
::A_ProgramFiles::
::A_Programs::
::A_ProgramsCommon::
::A_ScreenHeight::
::A_ScreenWidth::
::A_ScriptDir::
::A_ScriptFullPath::
::A_ScriptName::
::A_Sec::
::A_Space::
::A_StartMenu::
::A_StartMenuCommon::
::A_Startup::
::A_StartupCommon::
::A_StringCaseSense::
::A_Tab::
::A_Temp::
::A_ThisFunc::
::A_ThisHotkey::
::A_ThisLabel::
::A_ThisMenu::
::A_ThisMenuItem::
::A_ThisMenuItemPos::
::A_TickCount::
::A_TimeIdle::
::A_TimeIdlePhysical::
::A_TimeSincePriorHotkey::
::A_TimeSinceThisHotkey::
::A_TitleMatchMode::
::A_TitleMatchModeSpeed::
::A_UserName::
::A_WDay::
::A_WinDelay::
::A_WinDir::
::A_WorkingDir::
::A_YDay::
::A_Year::
::A_YWeek::
::A_YYYY::
   Var := RegExReplace(A_ThisHotkey,"^::A_","")
   Send, [url=http://www.autohotkey.com/docs/Variables.htm{#}%Var%]A_%Var%[/url]%A_EndChar%
Return


; ----------
; Built in functions
; ----------
::Abs()::
::ACos()::
::Asc()::
::ASin()::
::ATan()::
::Ceil()::
::Chr()::
::Cos()::
::DllCall()::
::Exp()::
::FileExist()::
::Floor()::
::GetKeyState()::
::InStr()::
::IsLabel()::
::Ln()::
::Log()::
::Mod()::
::NumGet()::
::NumPut()::
::OnMessage()::
::RegExMatch()::
::RegExReplace()::
::RegisterCallback()::
::Round()::
::Sin()::
::SubStr()::
::Sqrt()::
::StrLen()::
::Tan()::
::VarSetCapacity()::
::WinActive()::
::WinExist()::
   Var := RegExReplace(A_ThisHotkey,"^::(.*)\(\)$","$1")
   Send, [url=http://www.autohotkey.com/docs/Functions.htm{#}%Var%]%Var%()[/url]%A_EndChar%
Return


; ----------
; # Commands
; ----------
::#AllowSameLineComments::
::#ClipboardTimeout::
::#CommentFlag::
::#ErrorStdOut::
::#EscapeChar::
::#HotkeyInterval::
::#HotkeyModifierTimeout::
::#Hotstring::
::#IfWinActive::
::#IfWinExist::
::#IfWinNotActive::
::#IfWinNotExist::
::#Include::
::#IncludeAgain::
::#InstallKeybdHook::
::#InstallMouseHook::
::#KeyHistory::
::#LTrim::
::#MaxHotkeysPerInterval::
::#MaxMem::
::#MaxThreads::
::#MaxThreadsBuffer::
::#MaxThreadsPerHotkey::
::#NoEnv::
::#NoTrayIcon::
::#Persistent::
::#SingleInstance::
::#UseHook::
::#WinActivateForce::
   Var := RegExReplace(A_ThisHotkey,"^::#","")
   Send, [url=http://www.autohotkey.com/docs/commands/_%Var%.htm]#%Var%[/url]%A_EndChar%
Return


; ----------
; Commands
; ----------
::AutoTrim::
::BlockInput::
::Break::
::Click::
::ClipWait::
::Continue::
::Control::
::ControlClick::
::ControlFocus::
::ControlGet::
::ControlGetFocus::
::ControlGetPos::
::ControlGetText::
::ControlMove::
::ControlSend::
::ControlSendRaw::
::ControlSetText::
::CoordMode::
::Critical::
::DetectHiddenText::
::DetectHiddenWindows::
::Drive::
::DriveGet::
::DriveSpaceFree::
::Edit::
::Else::
::EnvAdd::
::EnvDiv::
::EnvGet::
::EnvMult::
::EnvSet::
::EnvSub::
::EnvUpdate::
::Exit::
::ExitApp::
::FileAppend::
::FileCopy::
::FileCopyDir::
::FileCreateDir::
::FileCreateShortcut::
::FileDelete::
::FileGetAttrib::
::FileGetShortcut::
::FileGetSize::
::FileGetTime::
::FileGetVersion::
::FileInstall::
::FileMove::
::FileMoveDir::
::FileRead::
::FileReadLine::
::FileRecycle::
::FileRecycleEmpty::
::FileRemoveDir::
::FileSelectFile::
::FileSelectFolder::
::FileSetAttrib::
::FileSetTime::
::FormatTime::
::GetKeyState::
::Gosub::
::Goto::
::GroupActivate::
::GroupAdd::
::GroupClose::
::GroupDeactivate::
::Gui::
::GuiControl::
::GuiControlGet::
::Hotkey::
::IfEqual::
::IfExist::
::IfGreater::
::IfGreaterOrEqual::
::IfInString::
::IfLess::
::IfLessOrEqual::
::IfMsgBox::
::IfNotEqual::
::IfNotExist::
::IfNotInString::
::IfWinActive::
::IfWinExist::
::IfWinNotActive::
::IfWinNotExist::
::ImageSearch::
::IniDelete::
::IniRead::
::IniWrite::
::Input::
::InputBox::
::KeyHistory::
::KeyWait::
::ListHotkeys::
::ListLines::
::ListVars::
::Loop::
::Menu::
::MouseClick::
::MouseClickDrag::
::MouseGetPos::
::MouseMove::
::MsgBox::
::OnExit::
::OutputDebug::
::Pause::
::PixelGetColor::
::PixelSearch::
::PostMessage::
::Process::
::Progress::
::Random::
::RegDelete::
::RegRead::
::RegWrite::
::Reload::
::Repeat::
::Return::
::Run::
::RunAs::
::RunWait::
::Send::
::SendEvent::
::SendInput::
::SendMessage::
::SendMode::
::SendPlay::
::SendRaw::
::SetBatchLines::
::SetCapslockState::
::SetControlDelay::
::SetDefaultMouseSpeed::
::SetEnv::
::SetFormat::
::SetKeyDelay::
::SetMouseDelay::
::SetNumlockState::
::SetScrollLockState::
::SetStoreCapslockMode::
::SetTimer::
::SetTitleMatchMode::
::SetWinDelay::
::SetWorkingDir::
::Shutdown::
::Sleep::
::Sort::
::SoundBeep::
::SoundGet::
::SoundGetWaveVolume::
::SoundPlay::
::SoundSet::
::SoundSetWaveVolume::
::SplashImage::
::SplashTextOff::
::SplashTextOn::
::SplitPath::
::StatusBarGetText::
::StatusBarWait::
::StringCaseSense::
::StringGetPos::
::StringLeft::
::StringLen::
::StringLower::
::StringMid::
::StringReplace::
::StringRight::
::StringSplit::
::StringTrimLeft::
::StringTrimRight::
::StringUpper::
::Suspend::
::SysGet::
::Thread::
::ToolTip::
::Transform::
::TrayTip::
::URLDownloadToFile::
::WinActivate::
::WinActivateBottom::
::WinClose::
::WinGet::
::WinGetActiveStats::
::WinGetActiveTitle::
::WinGetClass::
::WinGetPos::
::WinGetText::
::WinGetTitle::
::WinHide::
::WinKill::
::WinMaximize::
::WinMenuSelectItem::
::WinMinimize::
::WinMinimizeAll::
::WinMinimizeAllUndo::
::WinMove::
::WinRestore::
::WinSet::
::WinSetTitle::
::WinShow::
::WinWait::
::WinWaitActive::
::WinWaitClose::
::WinWaitNotActive::
   Var := RegExReplace(A_ThisHotkey,"^::","")
   Send, [url=http://www.autohotkey.com/docs/commands/%Var%.htm]%Var%[/url]%A_EndChar%
Return

_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Last edited by Slanter on Fri Aug 15, 2008 7:30 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Wed Aug 13, 2008 8:15 pm    Post subject: Reply with quote

MsgBox, woohoo it'll be definetely useful for mess answerers!
ToolTip, Thanks
ExitApp
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1390
Location: The Interwebs

PostPosted: Wed Aug 13, 2008 8:42 pm    Post subject: Reply with quote

Oooh. Definitely very useful.

Thanks!
Back to top
View user's profile Send private message AIM Address
Dra_Gon



Joined: 25 May 2007
Posts: 373

PostPosted: Wed Aug 13, 2008 9:06 pm    Post subject: Reply with quote

Good lordy! Can't say as I would be using it, but that was a heck of a lotta work. Good goin'!

Ciao,
Dra'Gon
_________________

For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Aug 13, 2008 9:28 pm    Post subject: Reply with quote

Dra_Gon wrote:
that was a heck of a lotta work
don't forget that you have autohotkey Laughing

Code:
Loop, Read, C:\Program Files\AutoHotkey\Extras\Editors\Syntax\Variables.txt
    o.= "::" A_LoopReadLine "::`n"
Var=
(
Var := RegExReplace(A_ThisHotkey,"^::A_","")
Send, [url=http://www.autohotkey.com/docs/Variables.htm{#}%Var%]A_%Var%[/url]%A_EndChar%
)
o.= o var "`nReturn"

Gui, Add, Edit, w500 h400, %o%
Gui, Show
Back to top
Dra_Gon



Joined: 25 May 2007
Posts: 373

PostPosted: Wed Aug 13, 2008 9:32 pm    Post subject: Reply with quote

DOH! Wink
_________________

For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/
Back to top
View user's profile Send private message Send e-mail
Slanter



Joined: 28 May 2008
Posts: 739
Location: Minnesota, USA

PostPosted: Wed Aug 13, 2008 9:34 pm    Post subject: Reply with quote

heh yeah, gotta love those syntax files Very Happy
it's too bad Hotkey doesn't support hotstrings, then this script would be less than 20 lines long Laughing
_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message Visit poster's website
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Wed Aug 13, 2008 9:58 pm    Post subject: Reply with quote

@Slanter:
Wish List?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions 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