AutoHotkey Community

It is currently May 26th, 2012, 10:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: August 13th, 2008, 8:11 pm 
Offline

Joined: May 28th, 2008, 2:11 am
Posts: 739
Location: Minnesota, USA
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 :P
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 August 15th, 2008, 7:30 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 8:15 pm 
MsgBox, woohoo it'll be definetely useful for mess answerers!
ToolTip, Thanks
ExitApp


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 8:42 pm 
Offline

Joined: April 18th, 2008, 7:57 am
Posts: 1390
Location: The Interwebs
Oooh. Definitely very useful.

Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 9:06 pm 
Offline

Joined: May 25th, 2007, 6:13 pm
Posts: 373
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

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

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 9:28 pm 
Dra_Gon wrote:
that was a heck of a lotta work
don't forget that you have autohotkey :lol:

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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 9:32 pm 
Offline

Joined: May 25th, 2007, 6:13 pm
Posts: 373
DOH! :wink:

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

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 9:34 pm 
Offline

Joined: May 28th, 2008, 2:11 am
Posts: 739
Location: Minnesota, USA
heh yeah, gotta love those syntax files :D
it's too bad Hotkey doesn't support hotstrings, then this script would be less than 20 lines long :lol:

_________________
Unless otherwise stated, all code is untested

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2008, 9:58 pm 
Offline

Joined: July 21st, 2008, 4:16 pm
Posts: 726
Location: Calgary, AB, Canada
@Slanter:
Wish List?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Stigg, toddintr and 8 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group