반응형
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- StringGetPos
- if(식)
- DetectHiddenWindows
- 식
- autohotkey
- API
- ControlGetText
- EnvDiv
- ControlSend
- 식의 설명
- SetEnv
- EnvMult
- IfInString
- Threads
- EnvAdd
- IfWinExist
- SetControlDelay
- IF (식)
- SetKeyDelay
- 배열
- if
- 함수
- MouseClick
- Var:=식
- Menu
- EnvSet
- Blocks
- EnvSub
- SetTitleMatchMode
- SetMouseDelay
Archives
- Today
- Total
ㄴrㅎnㅂrㄹrㄱi
HotString GUI 본문
반응형
Due to your great support, my first script is now ready.
Thank you guys.
Thank you guys.
; --------------------------------------------------------------------- ; Name: HotString GUI v0.2 ; Author: mallow ; Datum: 31.01.2005 ; ; Language: german/english ; Platform: tested with XP ; AutoHotkey Ver.: 1.0.25.10+ ; ; Description: ; With this script HotStrings can be managed via a GUI ; http://www.autohotkey.com/forum/viewtopic.php?t=2066 ; --------------------------------------------------------------------- ;*********************Autostart********************* ;*********************Configuration********************* DefFileName = HotString_Defs.ahk Menu, Tray, Icon, %A_WinDir%\system32\SHELL32.dll, 174 ; Get system language StringRight, Lng, A_Language, 2 if Lng = 07 ; = Deutsch (0407, 0807, 0c07 ...) { lngMsgDefFileNotFound = Definitionsdatei nicht gefunden.`r`n Neue Datei wird erstellt. lngDelete = &Loschen lngAdd = &Hinzufugen lngText = Text: lngOK = &OK lngCancel = &Abbrechen lngMsgHotStringInUse = Dieser HotString wird bereits benutzt. } else ; = other languages { lngMsgDefFileNotFound = Definition file not found.`r`n New file will be created. lngDelete = &Delete lngAdd = &Add lngText = Text: lngOK = &OK lngCancel = &Cancel lngMsgHotStringInUse = This HotString is already in use. } ;*********************End of configuration********************* IfNotExist, %DefFileName% { MsgBox, %lngMsgDefFileNotFound% FileAppend, #NoTrayIcon `n, %DefFileName% } Run, autohotkey.exe /f /r %DefFileName%, , , PID ;*********************End of Autostart********************* ^!A:: ; Strg+ALT+A hotkey ;Read definitions from file FileRead, List, %DefFileName% ;Build GUI Gui, Add, Text, x16 y10 w190 h20, HotStrings: Gui, Add, ListBox, gListbox x16 y30 w420 h180, Gui, Add, Button, gBtnDelete x336 y210 w100 h20, %lngDelete% Gui, Add, Button, gBtnAdd x336 y230 w100 h20, %lngAdd% Gui, Add, Text, x16 y210 w50 h20, HotString: Gui, Add, Edit, vAbbreviation x75 y207 w243 h20, Gui, Add, Text, x16 y233 w50 h20, %lngText% Gui, Add, Edit, vInsertText x75 y230 w243 h20, Gui, Add, Button, gBtnSave Default x128 y265 w90 h30, %lngOK% Gui, Add, Button, gGuiClose x238 y265 w90 h30, %lngCancel% Gui, Show, x246 y110 h318 w462, AutoText ;Add existing definitions to listbox StringReplace, List, List, `r`n, `n, All Loop, parse, List, `n, `r { If A_index > 1 Control, Add, %A_LoopField%, Listbox1, A } Return Listbox: ;Get selected item, split text and fill edit fields GuiControlGet, Content, , Listbox1 StringReplace, Content, Content, `:`:, ¢, all StringTrimLeft, Content, Content, 1 Loop, parse, Content, ¢ { GuiControl, , Edit%A_Index%, %A_LoopField% } Return BtnDelete: ;Delete selected item GuiControl, +AltSubmit, ListBox1 GuiControlGet, Content, , Listbox1 Control, Delete, %Content%, Listbox1 GuiControl, -AltSubmit, ListBox1 GuiControl, , Edit1; reset to blank GuiControl, , Edit2; reset to blank Return BtnAdd: ;Create new listbox item from content of edit fields NewItem=`:`: GuiControlGet, Content, , Edit1 NewItem=%NewItem%%Content% NewItem=%NewItem%`:`: ControlGet, List, List,, Listbox1, A IfInString, List, %NewItem% { MsgBox, %lngMsgHotStringInUse% } else { GuiControlGet, Content, , Edit2 NewItem=%NewItem%%Content% Control, Add, %NewItem%, Listbox1, A } Return BtnSave: ControlGet, List, List,, Listbox1, A Sort, List FileDelete, %DefFileName% FileAppend, #NoTrayIcon `n, %DefFileName% FileAppend, %List%, %DefFileName% Gui, Destroy Run, autohotkey.exe /f /r %DefFileName%, , UseErrorLevel, PID Return GuiClose: Gui, Destroy
반응형
'AUTOHOTKEY > 스크립트' 카테고리의 다른 글
숫자에 콤마 찍기 (0) | 2007.10.23 |
---|---|
SplashText Sizer - WYSIWYG (0) | 2007.10.23 |
SplashImage Maker - WYSIWYG (0) | 2007.10.23 |
마우스를 대면 툴팁으로 도움말을 보여준다. (0) | 2007.10.23 |
[윈도우 창정보 유틸리티] AHK_Window_Info_v1.5 (0) | 2007.10.23 |
Comments