Snippets Collections
#IfWinActive ahk_class CabinetWClass
+Enter:: ;open file with Paint/Notepad (open folder in new window)
#IfWinActive ahk_class ExploreWClass
+Enter::
#IfWinActive ahk_class Progman
+Enter::
#IfWinActive ahk_class WorkerW
+Enter::
WinGet, hWnd, ID, A
WinGetClass, vWinClass, % "ahk_id " hWnd
vPath := "", vIsDir := 0

if (vWinClass = "CabinetWClass") || (vWinClass = "ExploreWClass")
{
	for oWin in ComObjCreate("Shell.Application").Windows
	{
		if (oWin.HWND = hWnd)
		{
			vIsDir := oWin.Document.FocusedItem.IsFolder
			vPath := oWin.Document.FocusedItem.Path
			break
		}
	}
	oWin := ""
}
else if (vWinClass = "Progman") || (vWinClass = "WorkerW")
{
	VarSetCapacity(hWnd, 4, 0)
	;SWC_DESKTOP := 0x8 ;VT_BYREF := 0x4000 ;VT_I4 := 0x3 ;SWFO_NEEDDISPATCH := 0x1
	oWin := ComObjCreate("Shell.Application").Windows.FindWindowSW(0, "", 8, ComObject(0x4003, &hWnd), 1)
	vIsDir := oWin.Document.FocusedItem.IsFolder
	vPath := oWin.Document.FocusedItem.Path
	oWin := ""
}

if (vPath = "")
{
	MsgBox, % "error: file not found"
	return
}
else if !FileExist(vPath)
{
	MsgBox, % "error: file not found:`r`n" vPath
	return
}
else if vIsDir
{
	Run, % Chr(34) vPath Chr(34)
	return
}
FileGetSize, vSizeMB, % vPath, M
if (vSizeMB > 6)
{
	MsgBox, % "error: file too big: " vSizeMB " MB"
	return
}
SplitPath, vPath, vName, vDir, vExt, vNameNoExt, vDrive
if vExt in % "bmp,gif,jpe,jpeg,jpg,png"
	Run, mspaint.exe "%vPath%"
else
	Run, notepad.exe "%vPath%"
return
;Auto copy clipboard
~Lshift::
TimeButtonDown = %A_TickCount%
; Wait for it to be released
Loop
{
   Sleep 10
   GetKeyState, LshiftState, Lshift, P
   if LshiftState = U  ; Button has been released.
      break
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonDown%
   if elapsed > 200  ; Button was held down long enough
   {
      x0 = A_CaretX
      y0 = A_CaretY
      Loop
   {
     Sleep 20                    ; yield time to others
     GetKeyState keystate, Lshift
     IfEqual keystate, U, {
       x = A_CaretX
       y = A_CaretY
       break
     }
   }
   if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
   {                             ; Caret has moved
      clip0 := ClipBoardAll      ; save old clipboard
      ;ClipBoard =
      Send ^c                    ; selection -> clipboard
      ClipWait 1, 1              ; restore clipboard if no data
      IfEqual ClipBoard,, SetEnv ClipBoard, %clip0%
   }
      return
   }
}

~LButton::
MouseGetPos, xx
TimeButtonDown = %A_TickCount%
; Wait for it to be released
Loop
{
   Sleep 10
   GetKeyState, LButtonState, LButton, P
   if LButtonState = U  ; Button has been released.
   {
      If WinActive("Crimson Editor") and (xx < 25) ; Single Click in the Selection Area of CE
      {
         Send, ^c
         return
      }
      break
   }
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonDown%
   if elapsed > 200  ; Button was held down too long, so assume it's not a double-click.
   {
      MouseGetPos x0, y0            ; save start mouse position
      Loop
   {
     Sleep 20                    ; yield time to others
     GetKeyState keystate, LButton
     IfEqual keystate, U, {
       MouseGetPos x, y          ; position when button released
       break
     }
   }
   if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
   {                             ; mouse has moved
      clip0 := ClipBoardAll      ; save old clipboard
      ;ClipBoard =
      Send ^c                    ; selection -> clipboard
      ClipWait 1, 1              ; restore clipboard if no data
      IfEqual ClipBoard,, SetEnv ClipBoard, %clip0%
   }
      return
   }
}
; Otherwise, button was released quickly enough.  Wait to see if it's a double-click:
TimeButtonUp = %A_TickCount%
Loop
{
   Sleep 10
   GetKeyState, LButtonState, LButton, P
   if LButtonState = D  ; Button has been pressed down again.
      break
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonUp%
   if elapsed > 350  ; No click has occurred within the allowed time, so assume it's not a double-click.
      return
}

;Button pressed down again, it's at least a double-click
TimeButtonUp2 = %A_TickCount%
Loop
{
   Sleep 10
   GetKeyState, LButtonState2, LButton, P
   if LButtonState2 = U  ; Button has been released a 2nd time, let's see if it's a tripple-click.
      break
}
;Button released a 2nd time
TimeButtonUp3 = %A_TickCount%
Loop
{
   Sleep 10
   GetKeyState, LButtonState3, LButton, P
   if LButtonState3 = D  ; Button has been pressed down a 3rd time.
      break
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonUp%
   if elapsed > 350  ; No click has occurred within the allowed time, so assume it's not a tripple-click.
   {  ;Double-click
      Send, ^c
      return
   }
}
;Tripple-click:
   Sleep, 100
   Send, ^c
return

~^a::Send, ^c ;Ctl+A = Select All, then Copy
#c::
Send, {CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}
sleep, 300
Send, {CTRLDOWN}v{CTRLUP}{ENTER}{ALTDOWN}{TAB}{ALTUP}
return
;Double Right Click to paste
~RButton::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500)
{
Sleep 200 ; wait for right-click menu, fine tune for your PC
Send {Esc} ; close it
Send ^v ; or your double-right-click action here
}
Return
text=
(
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Lorem ipsum Joe@the-Automator.com dolor sit amet, (555)555.8957 the-Automator.com consectetuer adipiscing elit. 
https://www.linkedin.com/in/joeglines/ @recruiting  lorem ipsum
dolor sit http://github.com/maestrith/AHK-Studio elit.
dolor sit www.github.com/maestrith/AHK-Studio elit.
)
Pos:=1 ;set starting point

Loop, {
  ;Regex Pattern for URLs borrowed from https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
  Found_Pos:=RegExMatch(Text,"i)((http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&amp;amp;:\/~+#-]*[\w@?^=%&amp;amp;\/~+#-])?)",Obj,Pos)
  Pos:=Found_Pos+(StrLen(obj)+1) ;Set next start position
  URLs.=obj "`r" ;add to emails variable
  If not OBJ ;If not found break Loop
    Break
}
MsgBox % URLs
;Auto copy clipboard
~Lshift::
TimeButtonDown = %A_TickCount%
; Wait for it to be released
Loop
{
   Sleep 10
   GetKeyState, LshiftState, Lshift, P
   if LshiftState = U  ; Button has been released.
      break
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonDown%
   if elapsed > 200  ; Button was held down long enough
   {
      x0 = A_CaretX
      y0 = A_CaretY
      Loop
   {
     Sleep 20                    ; yield time to others
     GetKeyState keystate, Lshift
     IfEqual keystate, U, {
       x = A_CaretX
       y = A_CaretY
       break
     }
   }
   if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
   {                             ; Caret has moved
      clip0 := ClipBoardAll      ; save old clipboard
      ;ClipBoard =
      Send ^c                    ; selection -> clipboard
      ClipWait 1, 1              ; restore clipboard if no data
      IfEqual ClipBoard,, SetEnv ClipBoard, %clip0%
   }
      return
   }
}

~LButton::
MouseGetPos, xx
TimeButtonDown = %A_TickCount%
; Wait for it to be released
Loop
{
   Sleep 10
   GetKeyState, LButtonState, LButton, P
   if LButtonState = U  ; Button has been released.
   {
      If WinActive("Crimson Editor") and (xx < 25) ; Single Click in the Selection Area of CE
      {
         Send, ^c
         return
      }
      break
   }
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonDown%
   if elapsed > 200  ; Button was held down too long, so assume it's not a double-click.
   {
      MouseGetPos x0, y0            ; save start mouse position
      Loop
   {
     Sleep 20                    ; yield time to others
     GetKeyState keystate, LButton
     IfEqual keystate, U, {
       MouseGetPos x, y          ; position when button released
       break
     }
   }
   if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
   {                             ; mouse has moved
      clip0 := ClipBoardAll      ; save old clipboard
      ;ClipBoard =
      Send ^c                    ; selection -> clipboard
      ClipWait 1, 1              ; restore clipboard if no data
      IfEqual ClipBoard,, SetEnv ClipBoard, %clip0%
   }
      return
   }
}
; Otherwise, button was released quickly enough.  Wait to see if it's a double-click:
TimeButtonUp = %A_TickCount%
Loop
{
   Sleep 10
   GetKeyState, LButtonState, LButton, P
   if LButtonState = D  ; Button has been pressed down again.
      break
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonUp%
   if elapsed > 350  ; No click has occurred within the allowed time, so assume it's not a double-click.
      return
}

;Button pressed down again, it's at least a double-click
TimeButtonUp2 = %A_TickCount%
Loop
{
   Sleep 10
   GetKeyState, LButtonState2, LButton, P
   if LButtonState2 = U  ; Button has been released a 2nd time, let's see if it's a tripple-click.
      break
}
;Button released a 2nd time
TimeButtonUp3 = %A_TickCount%
Loop
{
   Sleep 10
   GetKeyState, LButtonState3, LButton, P
   if LButtonState3 = D  ; Button has been pressed down a 3rd time.
      break
   elapsed = %A_TickCount%
   elapsed -= %TimeButtonUp%
   if elapsed > 350  ; No click has occurred within the allowed time, so assume it's not a tripple-click.
   {  ;Double-click
      Send, ^c
      return
   }
}
;Tripple-click:
   Sleep, 100
   Send, ^c
return

~^a::Send, ^c ;Ctl+A = Select All, then Copy
#IfWinExist Oxford Advanced Learner
~LButton Up::
Clipboard := ""
Send {LButton}^c
ClipWait, 0
If ErrorLevel {
 MsgBox, 48, Error, An error occurred while waiting for the clipboard.
 Return
}
^+n::
WinActivate
Click, 182 133 2
Send ^a^v`n
Return
#IfWinExist
Esc::
Suspend, Off
Pause, Off, 1
If (toggle := !toggle) {
 Suspend, On
 Pause, On, 1
}
#SingleInstance, Force
click1:
KeyWait, LButton, D T0.2
KeyWait, LButton, D T0.2
KeyWait, LButton, D T0.2
if (ErrorLevel=0)
{
Send, ^c
goto, click1
}
else
{
goto, click1
}

RButton::
KeyWait, RButton, U, T0.2
KeyWait, RButton, D, T0.2
if (ErrorLevel=0)
{
Send, ^v
return
}
else
{
return
}
sp.StoreObject("minWindow", sp.WindowFromPoint(sp.GetCurrentMousePoint(), true));

var hCMD = sp.WindowFromClassOrTitle('CabinetWClass', '');
if (hCMD !== null){
    if(hCMD.Minimized) {
        sp.GetStoredObject("minWindow").Activate();
    } else {
        hCMD.Activate();
        hCMD.BringToFront();
    }
}else{
    sp.SendModifiedVKeys([vk.LWIN], [vk.VK_E]);
}
"""This is a finantial library useful to convert Candle Data from
financial time series datasets (Open,Close, High, Low, Volume).
It is built on Pandas and Numpy.
.. moduleauthor:: Joao Pedro Aguilera Cardoso
"""

import pandas as pd
from datetime import datetime


def convertcandle(
        time: pd.Series,
        open: pd.Series,
        high: pd.Series,
        low: pd.Series,
        close: pd.Series,
        timeframe: str,
        fromtime: str,
        totime: str,
        dtformat: str) -> pd.DataFrame:
    """OHLC Candle Converter
    Args:
        time(pandas.Series): dataset 'Time' Column.
        close(pandas.Series): dataset 'Close' column.
        high(pandas.Series): dataset 'High' column.
        low(pandas.Series): dataset 'Low' column.
        timeframe(str): output candle time Period (see reference above).
        fromtime(datetime): begin of conversion.
        totime(datetime): end of conversion.
        dtformat(str): string of all data input formats
    timeframe accepted output:
        ['1m', '5m', '15m', '30m', '1h', '2h', '3h', '4h', '6h', '12h', '1d', '1w', '1M', '1y']
    """

    def get_input_tf(time, fmt):
        first = datetime.strptime(time[0], fmt)
        second = datetime.strptime(time[1], fmt)

        tf = (second - first)
        return tf

    def check_tfs(dictframes, timeframe, time, dtformat):
        """this module verify that input is smaller than output."""
        if dictframes[timeframe][1] == 'M':
            dictframes[timeframe][0] = 32
            dictframes[timeframe][1] = 'd'
        if dictframes[timeframe][1] == 'y':
            dictframes[timeframe][0] = 370
            dictframes[timeframe][1] = 'd'

        input_tf = get_input_tf(time, dtformat)
        output_tf = pd.to_timedelta(dictframes[timeframe][0], unit=dictframes[timeframe][1])

        if input_tf >= output_tf:
            raise ValueError("Output timeframe must be bigger than input timeframe.")
        else:
            return input_tf

    def get_candle_times(time, timeframe, fromtime, totime, fmt):
        """This function will generate the time series for the output candle dataframe"""
        time_lst = time.tolist()
        fromtime = datetime.strptime(fromtime, fmt)
        totime = datetime.strptime(totime, fmt)
        for t in time_lst:
            t = datetime.strptime(t, fmt)

            if t >= fromtime:
                if timeframe[1] == 'm' and timeframe[0] < 60:  # minutely tfs
                    if t.minute % timeframe[0] == 0 and t.second == 0:
                        """You found the first candle time"""
                        new_time_lst = []
                        timedelta = pd.to_timedelta(timeframe[0], unit=timeframe[1])
                        while t < totime + timedelta:
                            str_t = datetime.strftime(t, fmt)
                            new_time_lst.append(str_t)
                            t = t + timedelta
                        else:
                            time_df = pd.Series(new_time_lst)
                            return time_df

                if timeframe[1] == 'm' and timeframe[0] > 60:  # hourly tfs
                    if t.hour % (timeframe[0] / 60) == 0 and t.minute == 0 and t.second == 0:
                        """You found the first candle time"""
                        new_time_lst = []
                        timedelta = pd.to_timedelta(timeframe[0], unit=timeframe[1])
                        while t < totime + timedelta:
                            str_t = datetime.strftime(t, fmt)
                            new_time_lst.append(str_t)
                            t = t + timedelta
                        else:
                            time_df = pd.Series(new_time_lst)
                            return time_df
                    pass

                if timeframe[1] == 'd' and timeframe[0] == 1:  # daily tf
                    if t.hour == 0 and t.minute == 0 and t.second == 0:
                        """You found the first candle time"""
                        new_time_lst = []
                        timedelta = pd.to_timedelta(timeframe[0], unit=timeframe[1])
                        while t < totime + timedelta:
                            str_t = datetime.strftime(t, fmt)
                            new_time_lst.append(str_t)
                            t = t + timedelta
                        else:
                            time_df = pd.Series(new_time_lst)
                            return time_df

                if timeframe[1] == 'w' and timeframe[0] < 60:  # weekly tf
                    if t.weekday() == 0 and t.hour == 0 and t.minute == 0 and t.second == 0:
                        """You found the first candle time"""
                        new_time_lst = []
                        timedelta = pd.to_timedelta(timeframe[0], unit=timeframe[1])
                        while t < totime + timedelta:
                            str_t = datetime.strftime(t, fmt)
                            new_time_lst.append(str_t)
                            t = t + timedelta
                        else:
                            time_df = pd.Series(new_time_lst)
                            return time_df

                if timeframe[1] == 'd' and timeframe[0] < 40:  # montly tf
                    if t.day == 1 and t.hour == 0 and t.minute == 0 and t.second == 0:
                        """You found the first candle time"""
                        new_time_lst = []
                        timedelta = pd.to_timedelta(timeframe[0], unit=timeframe[1])
                        while t < totime + timedelta:
                            str_t = datetime.strftime(t, fmt)
                            new_time_lst.append(str_t)
                            if t.month < 12:
                                t = t.replace(month=t.month + 1)
                            else:
                                t = t.replace(month=1, year=t.year + 1)

                        else:
                            time_df = pd.Series(new_time_lst)
                            return time_df

                if timeframe[1] == 'd' and timeframe[0] > 300:  # yearly tf
                    if t.month == 1 and t.day == 1 and t.hour == 0 and t.minute == 0 and t.second == 0:
                        new_time_lst = []
                        timedelta = pd.to_timedelta(timeframe[0], unit=timeframe[1])
                        while t < totime + timedelta:
                            str_t = datetime.strftime(t, fmt)
                            new_time_lst.append(str_t)
                            t = t.replace(year=t.year + 1)
                        else:
                            time_df = pd.Series(new_time_lst)
                            return time_df

    def get_candle_o_h_l_c(out_time, in_time, in_open, in_high, in_low, in_close, fromtime, totime, fmt):
        """The open value of each new candle will be the same value as the open from the last candle"""
        in_df = pd.DataFrame()
        in_df['time'] = in_time
        in_df['open'] = in_open
        in_df['high'] = in_high
        in_df['low'] = in_low
        in_df['close'] = in_close

        out_df = pd.DataFrame(columns=['time', 'open', 'high', 'low', 'close'])
        out_df['time'] = out_time

        open_lst = []
        out_df_time_lst = out_df.values.tolist()
        in_lst = in_df.values.tolist()
        out_cndl_lst = []
        c = 0
        i = 0
        while i < len(in_lst):
            in_row = in_lst[i]
            if datetime.strptime(fromtime, fmt) <= datetime.strptime(in_row[0], fmt):
                if datetime.strptime(in_row[0], fmt) < datetime.strptime(totime, fmt):
                    if in_row[0] == out_df_time_lst[c][0]:
                        time = out_df_time_lst[c][0]
                        open = in_row[1]
                        j = i
                        high_lst = []
                        low_lst = []
                        close = 0
                        while (c + 1) < len(out_df) and j < len(in_lst) and in_lst[j][0] != out_df_time_lst[c + 1][0]:
                            high_lst.append(in_lst[j][2])
                            low_lst.append(in_lst[j][3])
                            close = in_lst[j][4]
                            j += 1
                        out_cndl_lst.append(
                            [
                                time,
                                open,
                                max(high_lst),
                                min(low_lst),
                                close
                            ]
                        )
                        c += 1
                        i = j - 1


                else:
                    out_df = pd.DataFrame(out_cndl_lst, columns=['time', 'open', 'high', 'low', 'close'])
                    return out_df
            i += 1

    dictframes = {'1m': [1, 'm'], '5m': [5, 'm'], '15m': [15, 'm'], '30m': [30, 'm'], '1h': [60, 'm'],
                  '2h': [120, 'm'], '3h': [180, 'm'], '4h': [240, 'm'], '6h': [360, 'm'], '12h': [720, 'm'],
                  '1d': [1, 'd'], '1w': [1, 'w'], '1M': [1, 'M'], '1y': [1, 'y'],
                  }

    input_tf = check_tfs(dictframes, timeframe, time, dtformat)

    new_cndl_times = get_candle_times(time, dictframes[timeframe], fromtime, totime, dtformat)

    new_cndl_o_h_l_c = get_candle_o_h_l_c(new_cndl_times, time, open, high, low, close, fromtime, totime, dtformat)

    return 
var ht = sp.ForegroundWindow().Screen.Bounds.Height;
var wd = sp.ForegroundWindow().Screen.Bounds.Width;

var input = "";

var Forms = forms.System.Windows.Forms;
var form = new Forms.Form;

form.StartPosition = Forms.FormStartPosition.Manual;
form.FormBorderStyle = Forms.FormBorderStyle.FixedToolWindow;
form.TopMost = true;
form.ControlBox = false;
form.ShowInTaskbar = false;
form.Margin = new Forms.Padding(0);
form.Padding = new Forms.Padding(1); 
form.MinimumSize = new Size(100, 10);
//form.Size = new Size(300, 26);
form.Size = new Size(300, 34);
//form.Location = currentMouseLocation;
form.Location = new Point(wd/2 - 150, ht/2 - 60);
form.AutoSize = true;
form.GetType().GetProperty("DoubleBuffered",
        host.flags(clr.System.Reflection.BindingFlags.NonPublic,
        clr.System.Reflection.BindingFlags.Instance))
        .SetValue(form, true);
form.BackColor = Color.WhiteSmoke;

var textBox = new Forms.TextBox;
textBox.Size = new Size(150, 20);
textBox.Location = new Point(50, 5);
//textBox.Font = new System.Drawing.Font("Microsoft YaHei", 8, FontStyle.Regular);
textBox.Font = new System.Drawing.Font("Microsoft YaHei", 13, FontStyle.Regular);
textBox.Text = "";
textBox.Dock = System.Windows.Forms.DockStyle.Fill;
form.Controls.Add(textBox);

dragMoveBlind = ShowImageBindDragMove(form, form);
dragMoveBlind = ShowImageBindDragMove(form, textBox);

var form_shown = 
form.Shown.connect(
function (sender, args) {
    form.TopMost = true;
    form.Activate();
});

var textBox_KeyPress = 
textBox.KeyPress.connect(
function (sender, e) {
    // The keypressed method uses the KeyChar property to check 
    // whether the ENTER key is pressed. 
    // then, do action and close the Form
    if (e.KeyChar == 13)
    {
        input = textBox.Text;
        form.Close();
    // The keypressed method uses the KeyChar property to check 
    // whether the ESCAPE key is pressed. 
    // then close the Form
    } else if(e.KeyChar == 27) {
        form.Close();
    }
});

var textBox_KeyDown = 
textBox.KeyDown.connect(
function (sender, e) {
    // The keydown method uses the KeyChar property to check 
    // whether the Ctrl+SHIFT+J key is pressed. 
    // then, close the Form
    var hk = e.KeyCode
    if((e.Control) && (e.KeyCode==System.Windows.Forms.Keys.J) && (e.Shift)) {
        form.Close();
        StrokesPlus.Console.Log('OK');
    }
});

// Enable to double click the mouse right button to 
// drag the From
var textBox_doubleClick = 
textBox.DoubleClick.connect(
function (sender, args) {
  dragMoveBlind = ShowImageBindDragMove(form, textBox);
});

var form_doubleClick = 
form.DoubleClick.connect(
function (sender, args) {
  dragMoveBlind = ShowImageBindDragMove(form, form);
});

Forms.Application.Run(form);

function ShowImageBindDragMove(form, item) {
    var Cursors = forms.System.Windows.Forms.Cursors;
    var ReleaseCapture = sp_config.GetType().Assembly.GetType("API").GetMethod("ReleaseCapture");

    var item_mouseMove = 
    item.MouseMove.connect(
    function (sender, e) {
        var hitResize = form.Height + form.Width - (e.X + e.Y) < 30;
        var cursor = hitResize ? Cursors.SizeNWSE : Cursors.IBeam;
        if (item.Cursor != cursor) item.Cursor = cursor;
        if (e.Button == MouseButtons.Left) {
            ReleaseCapture.Invoke(null, null);
            sp.WindowFromHandle(form.Handle).SendMessageObj(0x0112,
                hitResize ? 0xF008 : 0xF012, 0);
        }
    });

    return [item_mouseMove];
}


if((input !== '')) {
    var kwd = input.slice(2);
    var str = '';

    if(input.slice(0, 2) == 'b ') {
        str = 'https://www.baidu.com/s?wd=';
    } else if(input.slice(0, 2) == 'd ') {
        str = 'https://duckduckgo.com/?q=';
    } else if(input.slice(0, 2) == 'g ') {
        str = 'https://www.google.com/search?q=';
    } else if(input.slice(0, 2) == 'w ') {
        str = 'https://zh.wikipedia.org/w/index.php?search=';
    } else if(input.slice(0, 2) == 'y ') {
        str = 'https://www.youtube.com/results?search_query=';
    }
    if(str !== '') {
        sp.RunProgram(str + kwd, '', 'open', 'normal', true, false, false);
    }
}

star

Mon Dec 05 2022 03:45:33 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?t

#autohotkey #0
star

Mon Dec 05 2022 03:41:50 GMT+0000 (Coordinated Universal Time) https://softwarerecs.stackexchange.com/questions/9791/copy-selection-to-clipboard-automatically

#0
star

Mon Dec 05 2022 03:40:21 GMT+0000 (Coordinated Universal Time) https://lifehacker.com/copy-and-paste-without-switching-windows-372457

#0
star

Mon Dec 05 2022 03:39:23 GMT+0000 (Coordinated Universal Time) https://lifehacker.com/turn-double-right-click-into-a-quick-clipboard-paste-sh-5314461

#autohotkey #0
star

Mon Dec 05 2022 03:34:10 GMT+0000 (Coordinated Universal Time) https://www.the-automator.com/using-a-regular-expression-regex-to-find-a-url-and-not-an-email-address/

#autohotkey #0
star

Mon Dec 05 2022 03:29:15 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?style

#autohotkey #0
star

Mon Dec 05 2022 03:28:05 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?style

#autohotkey #0
star

Mon Dec 05 2022 03:24:27 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?t

#autohotkey #0
star

Mon Dec 05 2022 03:23:06 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?t

#autohotkey #0
star

Mon Dec 05 2022 03:22:45 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?t

#autohotkey #0
star

Mon Dec 05 2022 03:17:54 GMT+0000 (Coordinated Universal Time) https://www.autohotkey.com/boards/viewtopic.php?t

#0
star

Mon Dec 05 2022 00:57:39 GMT+0000 (Coordinated Universal Time) https://forum.strokesplus.net/posts/t8465-Active-the-explorer-or-notepad-as-the-window-before-minimized

#0
star

Sun Dec 04 2022 21:44:14 GMT+0000 (Coordinated Universal Time)

#0
star

Sat Dec 03 2022 18:34:58 GMT+0000 (Coordinated Universal Time) https://forum.strokesplus.net/posts/t8452-Search-the-input-words-anywhere

#0

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension