Skip to content

Instantly share code, notes, and snippets.

@cocobelgica
cocobelgica / ahkexec.py
Created August 21, 2013 16:07
This plugin/command is for Sublime Text 3 Fixed: Sets current working directory to the file's directory(for saved file), otherwise to the user's home directory(for unsaved file/buffer)
import sublime, sublime_plugin
import subprocess
import os
import re
from ctypes import *
class ahkexec(sublime_plugin.TextCommand):
# SET YOUR SETTINGS HERE
# Specify a 'key'(name it whatever you want) and assign it
@cocobelgica
cocobelgica / ahkexec.py
Last active October 13, 2020 04:56 — forked from grey-code/ahkexec.py
import sublime, sublime_plugin
import subprocess
import re
from ctypes import *
class ahkexec(sublime_plugin.TextCommand):
# SET YOUR SETTINGS HERE
# Specify a 'key'(name it whatever you want) and assign it
# a 'value'(string) containing the path to the AHK executable.
/*
___________________________________________________________________________________
***THE FOLLOWING METHOD(s) ARE USING SIMILAR ROUTINES AND ARE CALLED DYNAMICALLY.
THEY REDIRECT TO INTERNAL METHOD(s), THUS, DOCUMENTATION IS STATED HERE***
____________________________________________________________________________________
METHOD(s): addElement/insertElement
DEFINITION: Appends or inserts an element node
PARAMETER(s):
; Random Gist
; Forum post testing
MsgBox, % "OS Version: " A_OSVersion
. "`nOS Type: " A_OsType
. "`nAHK PAth: " A_AhkPath
. "`nAHK Version: " A_AhkVersion
ExitApp
@cocobelgica
cocobelgica / Menu Creator.ahk
Created October 20, 2012 09:44
Menu Creator (AutoHotkey_L)
#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
CreateMenu(LVMenu, PMenu), CreateHotkey("PGUP", "PGDN")
, qmenu := new MenuProp()
, item := new ItemProp()
, qmenu.Create(), qmenu.Show()
return
@cocobelgica
cocobelgica / Menu.ahk
Created October 20, 2012 09:40
Class: Menu (AutoHotkey_L)
/*;=======================================================================================
class: Menu
;=======================================================================================
*/
class Menu
{
static MenuList := [], MenuCount := 0, RetVal := ""
__New(MenuName) { ; Creates a new menu