 |
AutoHotkey Community Wir helfen uns gegenseitig aus der Patsche
|
| Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
| Autor |
Nachricht |
Thalon
Anmeldedatum: 25.10.2005 Beiträge: 1896 Wohnort: Österreich
|
Verfasst am: Do Feb 15, 2007 2:14 pm Titel: Hotstring-Creator |
|
|
Das Tool bietet eine Oberfläche zum einfachen Konfigurieren von HotStrings.
Oben Abkürzung eingeben, unten den Text oder Code (bei Code sollte man allerdings mit einem Enter anfangen, weil es sonst zum Syntaxfehler kommt, außer es ist ein Einzeiler.
Dann noch die zu verwendenden Optionen anhaken (meine Lieblinge sind preselected) und mit OK bestätigen. Gleich darauf ist der neue Hotstring verwendbar!
| Code: | ;#NoTrayIcon
#NoEnv
#SingleInstance force
#Hotstring EndChars :
AutoTrim Off
return
#h:: ; Win+H hotkey
ClipboardOld = %Clipboard%
Clipboard =
Send ^c
ClipWait 0.5
if Clipboard !=
{
; Replace CRLF and/or LF with `n for use in a "send-raw" Hotstring:
; The same is done for any other characters that might otherwise be a problem in raw mode:
StringReplace, Hotstring, Clipboard, ``, ````, All ; Do this replacement first to avoid interfering with the others below.
StringReplace, Hotstring, Hotstring, `a, ``r``n, All ; Using `r works better than `n in MS Word, etc.
StringReplace, Hotstring, Hotstring, %A_Tab%, ``t, All
StringReplace, Hotstring, Hotstring, `;, ```;, All
;If a file is selected in Explorer a Run-command is prepaired!
IfInString, Hotstring, :\
Hotstring = `rRun, %Hotstring%`r`nreturn
}
else
HotString = %Clipboard%
Clipboard = %ClipboardOld% ; Restore previous contents of clipboard.
Gui, Add, Groupbox, x10 y10 w320 h100 section, HotString
Gui, Add, Edit, xs+10 ys+20 w160 section vAbbreviation, Abbreviation
Gui, Add, Button, xs+180 ys-1 w50 Default gOK -TabStop, OK
Gui, Add, Button, xs+250 ys-1 w50 gCancel -TabStop, Cancel
Gui, Add, Edit, xs+0 ys+25 r3 w300 section vHotstring, %Hotstring%
Gui, Add, Groupbox, x10 y120 w320 h220 section, Options
Gui, Add, Checkbox, xs+10 ys+20 section Checked vAsterisk, *: No ending character required.
Gui, Add, Checkbox, xs+0 ys+25 section Checked vQuestion, ?: Hotstring will be triggered inside another word.
Gui, Add, Checkbox, xs+0 ys+25 section vNo_Backspacing, B0: Abbreviation is not erased.
Gui, Add, Checkbox, xs+0 ys+25 section Checked vCase_Sensitive, C: Case sensitive.
Gui, Add, Checkbox, xs+0 ys+25 section vOmit, O: Omit the ending character.
Gui, Add, Checkbox, xs+0 ys+25 section vRaw, R: SendRaw.
Gui, Add, Radio, xs+0 ys+25 section Checked vSendMode, SendInput
Gui, Add, Radio, xs+90 ys+0, SendPlay
Gui, Add, Radio, xs+180 ys+0, SendEvent
Gui, Add, Checkbox, xs+0 ys+25 section Checked vReset_Recognizer, Z: Resets hoststring recognizer each time.
Gui, Show, , New Hotstring
return
OK:
Gui, Submit, NoHide
if Abbreviation =
{
msgbox, 262192, Exclamation!, Please enter a abbreviation!
return
}
if Asterisk = 1
Options = *
if Question = 1
Options = %Options%?
if No_Backspacing = 1
Options = %Options%B0
if Case_Sensitive = 1
Options = %Options%C
if Omit = 1
Options = %Options%O
if Raw = 1
Options = %Options%R
;SendMode1 is default and not handled
if SendMode = 2
Options = %Options%SP
else if SendMode = 3
Options = %Options%SE
if Reset_Recognizer = 1
Options = %Options%Z
StringReplace, Hotstring, Hotstring, `n, ``n, All
FileAppend, `n:%Options%:%Abbreviation%::%Hotstring%, %A_ScriptFullPath% ; Put a `n at the beginning in case file lacks a blank line at its end.
Reload
Sleep 2000 ; If successful, the reload will close this instance during the Sleep, so the line below will never be reached.
MsgBox, 4,, The hotstring just added appears to be improperly formatted. Would you like to open the script for editing? Note that the bad hotstring is at the bottom of the script.
IfMsgBox, Yes, Edit
return
GuiEscape:
GuiClose:
Cancel:
Options =
Gui, Destroy
return
| Thalon _________________ Mein Motto: Hilfe zur Selbsthilfe!
Teildeutsche Hilfe (CHM)!! und Deutsche Online-Hilfe
Zuletzt bearbeitet von Thalon am Mi Jul 23, 2008 7:26 am, insgesamt einmal bearbeitet |
|
| Nach oben |
|
 |
DHMH(n-l-i) Gast
|
Verfasst am: Fr Jul 18, 2008 12:27 pm Titel: Neuer Upload |
|
|
könntest du das noch einmal hochladen, bitte?
Danke im Voraus!
MfG, DHMH |
|
| Nach oben |
|
 |
Ripp3r]D3[
Anmeldedatum: 11.11.2007 Beiträge: 743 Wohnort: Altenburg\Kernel32.dll
|
Verfasst am: Fr Jul 18, 2008 12:38 pm Titel: |
|
|
un noch en schönen ScreenShot _________________
ResistantX:
"...In deren Köpfen läuft das selbe Programm welches auch bei den früheren Jahrgängen lief! Ich bin der Virus der diese Programme zerstören will..." |
|
| Nach oben |
|
 |
Outlaw
Anmeldedatum: 14.10.2006 Beiträge: 463
|
Verfasst am: Fr Jul 18, 2008 3:06 pm Titel: |
|
|
neuer upload wäre opti _________________ MfG,
Outlaw |
|
| Nach oben |
|
 |
Thalon
Anmeldedatum: 25.10.2005 Beiträge: 1896 Wohnort: Österreich
|
|
| Nach oben |
|
 |
Outlaw
Anmeldedatum: 14.10.2006 Beiträge: 463
|
Verfasst am: Do Jul 24, 2008 9:26 am Titel: |
|
|
super vielen dank
edit: koennte man da nicht noch eine uebersicht machen, und am besten ne extra ahk erstellen umd komplimieren lassen _________________ MfG,
Outlaw |
|
| Nach oben |
|
 |
Ripp3r]D3[
Anmeldedatum: 11.11.2007 Beiträge: 743 Wohnort: Altenburg\Kernel32.dll
|
Verfasst am: Do Jul 24, 2008 12:11 pm Titel: |
|
|
Habe hier ma ne CMD version gemacht die man mit ins script stecken kann
Aenderunge:
Keine Gui mehr zum Compilen
ScreenShot:
Download:
Datum: 24.07.2008 14:06:06
Datei: AHK2ExeCMD_v1.0.7z
Größe: 809.447 Byte
Download-Link: http://uploaded.to/?id=33ufkq
Datum: 24.07.2008 14:06:17
Datei: AHK2ExeCMD_v1.0.zip
Größe: 809.831 Byte
Download-Link: http://uploaded.to/?id=gzk0ku
Datum: 24.07.2008 14:06:27
Datei: AHK2ExeCMD_v1.0.tar
Größe: 813.056 Byte
Download-Link: http://uploaded.to/?id=6nc9pq
Greez da Ripp3r]D3[ _________________
ResistantX:
"...In deren Köpfen läuft das selbe Programm welches auch bei den früheren Jahrgängen lief! Ich bin der Virus der diese Programme zerstören will..." |
|
| Nach oben |
|
 |
Outlaw
Anmeldedatum: 14.10.2006 Beiträge: 463
|
Verfasst am: Do Jul 24, 2008 6:25 pm Titel: |
|
|
super habe direkt was feines gebaut
edit: ich habe nur ein problem, ich kann keine smiles mit einbauen, der zeigt die bei der hotstring eingabe einfach nicht _________________ MfG,
Outlaw |
|
| Nach oben |
|
 |
Thalon
Anmeldedatum: 25.10.2005 Beiträge: 1896 Wohnort: Österreich
|
Verfasst am: Fr Jul 25, 2008 9:07 am Titel: |
|
|
@Ripp3r]D3[
Ich habe mir den Source nicht heruntergeladen, aber was macht ein Skriptcompiler hier beim Hotstring-Creator?
| Zitat: | | ich habe nur ein problem, ich kann keine smiles mit einbauen, der zeigt die bei der hotstring eingabe einfach nicht | Schon versucht die Zeichen für den Smilie entsprechend zu escapen?
Hier einmal ein paar Smilies die ich verwende: | Code: | :*?CZ:autsch1::(>_<)
:*?CZ:musik1:: ; d(^_^)b
SendRaw d(`^_`^)b
return
:*?CZ:-.-::(-.-)
:*?CZ:clever1::`;o)) | Der Musik-Smilie funktioniert anscheinend aktuell nicht, weiß allerdings nicht weshalb, ging schon Mal...
Thalon _________________ Mein Motto: Hilfe zur Selbsthilfe!
Teildeutsche Hilfe (CHM)!! und Deutsche Online-Hilfe |
|
| Nach oben |
|
 |
Ripp3r]D3[
Anmeldedatum: 11.11.2007 Beiträge: 743 Wohnort: Altenburg\Kernel32.dll
|
Verfasst am: Fr Jul 25, 2008 11:10 am Titel: |
|
|
| Outlaw hat Folgendes geschrieben: | super vielen dank
edit: koennte man da nicht noch eine uebersicht machen, und am besten ne extra ahk erstellen umd komplimieren lassen |
Die antwort kam durch diese frage _________________
ResistantX:
"...In deren Köpfen läuft das selbe Programm welches auch bei den früheren Jahrgängen lief! Ich bin der Virus der diese Programme zerstören will..." |
|
| Nach oben |
|
 |
Thalon
Anmeldedatum: 25.10.2005 Beiträge: 1896 Wohnort: Österreich
|
Verfasst am: Fr Jul 25, 2008 11:36 am Titel: |
|
|
Wobei sich da natürlich die Frage stellt wieso man nicht einfach die ahk2exe-Kommandozeilenfunktion verwendet
Und als Exe funktioniert das Skript ohnehin nicht ohne, dass es sich selbst dekompiliert, die Änderungen vornimmt, neu kompiliert und startet.
Eine Alternative wäre natürlich den Codepart separat zu kompilieren und ein zweites File für die Hotstring-Defintion zu erstellen, welche dann bei Änderung neu kompiliert wird.
Ich wollte halt eine One-File-Lösung
Thalon _________________ Mein Motto: Hilfe zur Selbsthilfe!
Teildeutsche Hilfe (CHM)!! und Deutsche Online-Hilfe |
|
| Nach oben |
|
 |
Ripp3r]D3[
Anmeldedatum: 11.11.2007 Beiträge: 743 Wohnort: Altenburg\Kernel32.dll
|
Verfasst am: Fr Jul 25, 2008 11:38 am Titel: |
|
|
| Thalon hat Folgendes geschrieben: | Wobei sich da natürlich die Frage stellt wieso man nicht einfach die ahk2exe-Kommandozeilenfunktion verwendet
Und als Exe funktioniert das Skript ohnehin nicht ohne, dass es sich selbst dekompiliert, die Änderungen vornimmt, neu kompiliert und startet.
Eine Alternative wäre natürlich den Codepart separat zu kompilieren und ein zweites File für die Hotstring-Defintion zu erstellen, welche dann bei Änderung neu kompiliert wird.
Ich wollte halt eine One-File-Lösung
Thalon |
http://de.autohotkey.com/forum/viewtopic.php?t=3278#26633 _________________
ResistantX:
"...In deren Köpfen läuft das selbe Programm welches auch bei den früheren Jahrgängen lief! Ich bin der Virus der diese Programme zerstören will..." |
|
| Nach oben |
|
 |
Outlaw
Anmeldedatum: 14.10.2006 Beiträge: 463
|
Verfasst am: Fr Jul 25, 2008 2:09 pm Titel: |
|
|
also ich habe es so geloest, ein gui mit listview wo alle drin stehen
dann noch ein gui mit hotstring und text eingabe, beim erstellen wird eine neue ahk in exe umgewandelt und gestartet, bei dem gui mit listview kann ich auch den hotstring loeschen und bearbeiten, klappt alles sehr gut ohne probleme  _________________ MfG,
Outlaw |
|
| Nach oben |
|
 |
Thalon
Anmeldedatum: 25.10.2005 Beiträge: 1896 Wohnort: Österreich
|
|
| Nach oben |
|
 |
Outlaw
Anmeldedatum: 14.10.2006 Beiträge: 463
|
Verfasst am: Sa Jul 26, 2008 7:24 pm Titel: |
|
|
Ist aber sehr simple gecoded, aber macht sein job
Menü aufruf mit #h
| Code: | #NoTrayIcon
#NoEnv
#SingleInstance force
AutoTrim Off
filecreatedir, data\
sleep, 1000
fileinstall, data\Ahk2exe.exe, data\Ahk2Exe.exe, 1
fileinstall, data\AutoHotkeySC.bin, data\AutoHotkeySC.bin, 1
fileinstall, data\upx.exe, data\upx.exe, 1
ifnotexist, data\hotstring.ahk
{
fileappend,
(
#NoTrayIcon
#NoEnv
#SingleInstance force
#Hotstring EndChars :
AutoTrim Off
), data\hotstring.ahk
gosub, new
}
ifexist, data\hotstring.exe
{
run, data\hotstring.exe
return
}
startgo:
filedelete, data\list.txt
loop,read, data\hotstring.ahk
{
ifinstring, a_loopreadline, :*?CZ:
{
fileappend, %a_loopreadline%|,data\list.txt
}
}
fileread, list_r, data\list.txt
Gui, Add, ListBox, x16 y30 w370 h160 vdel_v +HScroll, %list_r%
Gui, Add, GroupBox, x6 y10 w390 h190 , Hotstrings
Gui, Add, Button, x16 y210 w100 h30 gnew, Neu anlegen
Gui, Add, Button, x316 y200 w80 h20 gsich, zurücksetzten
Gui, Add, Button, x316 y220 w80 h20 gdel, Entfernen
Gui, Add, Button, x166 y210 w100 h30 gbear, Bearbeiten
; Generated using SmartGUI Creator 4.0
Gui, Show, x560 y371 h250 w407, Hotstring Creator v1.01
Return
bear:
gui,submit,nohide
filedelete, data\bla.txt
filedelete, data\sd.txt
fileappend, %del_v%, data\sd.txt
loop,read, data\sd.txt
{
ifinstring, a_loopreadline, :*?CZ:
{
bedo_r = %a_loopreadline%
stringreplace, bedo_r , bedo_r, ::,`n, all
fileappend, %bedo_r%, data\bla.txt
filereadline, hot_r, data\bla.txt, 1
filereadline, text_r, data\bla.txt, 2
stringreplace,hot_r,hot_r,:*?CZ:,,all
stringreplace,text_r,text_r,``n,`n,all
fileread, hs_r, data\hotstring.ahk
stringreplace, hs_r,hs_r, %del_v%, , all
process,close, hotstring.exe
filedelete, data\hotstring.ahk
fileappend, %hs_r%, data\hotstring.ahk
sleep, 500
gosub, new
}
}
return
del:
gui,submit,nohide
filedelete, data\list.txt
loop,read, data\hotstring.ahk
{
ifinstring, a_loopreadline, :*?CZ:
{
fileappend, %a_loopreadline%|,data\list.txt
}
}
fileread, hs_r, data\hotstring.ahk
stringreplace, hs_r,hs_r, %del_v%, , all
process,close, hotstring.exe
filedelete, data\hotstring.ahk
fileappend, %hs_r%, data\hotstring.ahk
sleep, 200
gosub, comp
return
sich:
msgbox, 36, Hotstring creator, Alles zurücksetzten? (sicherung ist in sich.txt zu finden)
ifmsgbox, yes
{
process,close, hotstring.exe
filedelete, data\hotstring.exe
filedelete, data\hotstring.ahk
fileappend,
(
#NoTrayIcon
#NoEnv
#SingleInstance force
AutoTrim Off
), data\hotstring.ahk
exitapp
}
return
new:
Gui, 2:Add, GroupBox, x6 y10 w470 h280 , Hotstring erstellen
Gui, 2:Add, Edit, x106 y30 w130 h20 vAbbreviation, %hot_r%
Gui, 2:Add, Text, x16 y30 w90 h20 , Hotstring
Gui, 2:Add, Edit, x16 y60 w450 h220 vHotstring +HScroll, %text_r%
Gui, 2:Add, Button, x169 y300 w150 h40 gok, Erstellen
Gui, 2:Add, Button, x6 y290 w50 h20 gabb, Abbruch
; Generated using SmartGUI Creator 4.0
Gui, 2:Show, x573 y237 h351 w488, Hotstring Creator v1.01
Return
abb:
gui, 2:destroy
return
OK:
Gui, Submit, NoHide
if Abbreviation =
{
msgbox, 262192, Exclamation!, Please enter a abbreviation!
return
}
StringReplace, Hotstring, Hotstring, `n, ``n, All
process,close, hotstring.exe
filedelete, data\hotstring.exe
FileAppend,%Abbreviation%`n%Hotstring%`n`n, data\sich.txt
FileAppend,:*?CZ:%Abbreviation%::%Hotstring%|, data\list.txt
FileAppend,`n:*?CZ:%Abbreviation%::%Hotstring%, data\hotstring.ahk
comp:
runwait, data\ahk2exe.exe /in data\hotstring.ahk
sleep, 2000
run, data\hotstring.exe
msgbox, 64, Hotstring Creator Info, Hotstring.exe wurde gestartet, Hotstring befehle sind nun aktiv. (Windowstaste + H um Menü wieder aufzurufen)
reload
return
GuiEscape:
GuiClose:
Cancel:
Gui, Destroy
return
#h::
gosub,startgo
return |
_________________ MfG,
Outlaw |
|
| Nach oben |
|
 |
|
|
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten.
|
Powered by phpBB © 2001, 2005 phpBB Group Deutsche Übersetzung von phpBB.de
|