Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Ich bin neu in AutoHotkey und die Tastatur mit Morsecode belegt


  • Please log in to reply
1 reply to this topic
Ph1d14s
  • Members
  • 1 posts
  • Last active: Mar 08 2015 10:28 AM
  • Joined: 04 Mar 2015

Hallo zusammen,

Wie oben in der Überschrift geschrieben bin ich neu und mein Script ist für euch vermutlich kinderkram, trotzdem würde es mich freuen, wenn ihr es euch mal angucken könnt.

Ich finde AutoHotkey total interessant und wollte mal leicht anfangen. Ich habe die Buchstaben meiner Tastatur mit dem jeweiligen Äquivalent im Morse Code belegen wollen und das kam dabei heraus:

::a::.- 
::b::-... 
::c::-.-. 
::d::-.. 
::e::. 
::f::..-. 
::g::--. 
::h::.... 
::i::.. 
::j::.--- 
::k::-.- 
::l::.-.. 
::m::-- 
::n::-. 
::o::--- 
::p::.--. 
::q::--.- 
::r::.-. 
::s::... 
::t::- 
::u::..- 
::v::...- 
::w::.-- 
::x::-..- 
::y::-.-- 
::z::--.. 
::0::----- 
::1::.---- 
::2::..--- 
::3::...-- 
::4::....- 
::5::..... 
::6::-.... 
::7::--... 
::8::---.. 
::9::----. 
::ä::.-.- 
::ch::----
::ö::---. 
::-::-....- 
::"::.-..-. 
::AA::.-.- 
::AR::.-.-. 
::AS::.-... 
::BK::-...-.- 
::BT::-...- 
::CL::-.-..- .. 
::CT::-.-.- 
::DO::-..--- 
::KN::-.--. 
::SK::...-.- 
::SOS::... --- ... 

Ich weiß, wirklich kinderkacke, alles Hotstrings

Ich habe mein wissen über den Morse Code übrigens von hier --> http://morsecode.scp...com/morse2.html

 

Warum ich nur Hotstrings benutzt habe? Bei dem Tutorial das ich gefunden habe blicke ich ansonsten nicht so wirklich durch.

 

Bei dem Script sind mir folgende Probleme aufgefallen:

1. einige Symbole wurden ohne erkenntlichen Grund nicht angenommen (, . - + = ! ? " § etc.) habe ich dann rausgelöscht.

2. Ich finde es sehr unpraktisch das man nach jedem Buchstaben die Leertaste drücken muss um den Buchstaben zu übersetzten.

 

Falls ihr Einfälle habt wie man das Script optimieren kann (das geht auf jeden Fall) einfach antworten oder mir auf Facebook schreiben.

Ich würde mich, falls ihr Lust und Laune habt, auch über eine Schrittweise Erklärung eurer Lösungen/Optimierungen freuen.

 

Gruß

Ph1d14s



garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005

nur kurz ,

suche auch in google für Ideen / Lösungen   z.B site:autohotkey.com morse

http://ahkscript.org....php?f=5&t=5259

http://www.autohotke...rite-morsecode/

 

siehe auch

http://ahkscript.org/

und download hier die neueste AHK-Version

 

ein Beispiel, MORSE siehe in DOS window  ( Telnet )

modified=20150305
;------- Send to DOS telehack MORSE ELIZA etc ----
;=================================================

xxx=%a_windir%\system32\telnet.exe   ;- << check path
ifnotexist,%xxx%
  exitapp

url = http://www.netikus.net/show_ip.html   ;- to show public IP-address
Adr:= UrlDownloadToVar( URL )               ;-

title1=Telnet telehack.com
Run, %COMSPEC% /k "title %title1% & mode con lines=555 cols=140&COLOR 0E&CD\",,,pid1
WinWait, ahk_pid %pid1%
WinMove,ahk_pid %PID1%,,1,1,800,990
WinWaitActive, %title1% ahk_pid %PID1%
sleep,400
gosub,telehack
return
;--------------------
telehack:
aa=Telnet telehack.com
controlsend,,%aa%`r,ahk_pid %pid1%
sleep,2000
controlsend,,geoip %adr%`r,ahk_pid %pid1%
sleep,2000
controlsend,,cowsay /cow /joke Hello %a_username% (use ESC-button to quit)`r,ahk_pid %pid1%
sleep,2000
controlsend,,morse SOS Hello %a_username%`r,ahk_pid %pid1%
sleep,2000
controlsend,,morse Write here a NEW text and ENTER,ahk_pid %pid1%
return
;---------------------
UrlDownloadToVar(URL) {
 WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
 WebRequest.Open("GET", URL)
 WebRequest.Send()
 Return WebRequest.ResponseText
}
;--------------------

esc::
controlsend,,cowsay /cow /dead Good bye %a_username% now you quit Telnet & DOS`r,ahk_pid %pid1%
sleep,3000
controlsend,,quit`n,ahk_pid %pid1%
sleep,1800
controlsend,,e`n,ahk_pid %pid1%
sleep,1200
Process, Close, %pid1%
Process, WaitClose, %pid1%
process,close,telnet.exe
ExitApp
;========= END script ==================