tomtomtom Posted January 5, 2008 Share Posted January 5, 2008 Please see the script below. It is the beginning of a script for real realtime chatting, character by character. The idea is that both parties have a WordPad screen and every keystroke of either party is recorded in both wordpad screens. My script is far from complete. A transmit function still needs to be written, probably using the Skype API. Also, I will need some kind of "receive" function. However, I have a few questions about the script as it is at this moment: Why does'nt it work for a ! character? Why does'nt it work for a $ character? As you can see, this is a long and boring script. Is there a shorter and more intelligent way to do this? Thank you for reading this and thank you in advance for you advice. Tom CODERun("C:\Program Files\Windows NT\Bureau-accessoires\WordPad.exe", "", @SW_MAXIMIZE) HotKeySet("a","fal");fal=Function a lowercase HotKeySet("b","fbl") HotKeySet("c","fcl") HotKeySet("d","fdl") HotKeySet("e","fel") HotKeySet("f","ffl") HotKeySet("g","fgl") HotKeySet("h","fhl") HotKeySet("i","fil") HotKeySet("j","fjl") HotKeySet("k","fkl") HotKeySet("l","fll") HotKeySet("m","fml") HotKeySet("n","fnl") HotKeySet("o","fol") HotKeySet("p","fpl") HotKeySet("q","fql") HotKeySet("r","frl") HotKeySet("s","fsl") HotKeySet("t","ftl") HotKeySet("u","ful") HotKeySet("v","fvl") HotKeySet("w","fwl") HotKeySet("x","fxl") HotKeySet("y","fyl") HotKeySet("z","fzl") HotKeySet("0","f0l") HotKeySet("1","f1l") HotKeySet("2","f2l") HotKeySet("3","f3l") HotKeySet("4","f4l") HotKeySet("5","f5l") HotKeySet("6","f6l") HotKeySet("7","f7l") HotKeySet("8","f8l") HotKeySet("9","f9l") HotKeySet("A","fAU");fAU=Function A Uppercase HotKeySet("B","fBU") HotKeySet("C","fCU") HotKeySet("D","fDU") HotKeySet("E","fEU") HotKeySet("F","fFU") HotKeySet("G","fGU") HotKeySet("H","fHU") HotKeySet("I","fIU") HotKeySet("J","fJU") HotKeySet("K","fKU") HotKeySet("L","fLU") HotKeySet("M","fMU") HotKeySet("N","fNU") HotKeySet("O","fOU") HotKeySet("P","fPU") HotKeySet("Q","fQU") HotKeySet("R","fRU") HotKeySet("S","fSU") HotKeySet("T","fTU") HotKeySet("U","fUU") HotKeySet("V","fVU") HotKeySet("W","fWU") HotKeySet("X","fXU") HotKeySet("Y","fYU") HotKeySet("Z","fZU") HotKeySet("{!}","fExcla") HotKeySet("{ASC(036)}","fDollar") HotKeySet("%","fPerc") HotKeySet("&","fNper") HotKeySet("(","fLBracket") HotKeySet(")","fRBracket") HotkeySet("{BS}","fBacksp") HotkeySet(" ", "fSpace") HotKeySet("{ENTER}", "fEnter") While 1 Sleep(100) WEnd Func fal() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","a") Trans("a") EndFunc Func fbl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","b") Trans("b") EndFunc Func fcl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","c") Trans("c") EndFunc Func fdl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","d") Trans("d") EndFunc Func fel() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","e") Trans("e") EndFunc Func ffl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","f") Trans("f") EndFunc Func fgl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","g") Trans("g") EndFunc Func fhl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","h") Trans("h") EndFunc Func fil() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","i") Trans("i") EndFunc Func fjl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","j") Trans("j") EndFunc Func fkl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","k") Trans("k") EndFunc Func fll() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","l") Trans("l") EndFunc Func fml() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","m") Trans("m") EndFunc Func fnl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","n") Trans("n") EndFunc Func fol() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","o") Trans("o") EndFunc Func fpl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","p") Trans("p") EndFunc Func fql() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","q") Trans("q") EndFunc Func frl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","r") Trans("r") EndFunc Func fsl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","s") Trans("s") EndFunc Func ftl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","t") Trans("t") EndFunc Func ful() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","u") Trans("u") EndFunc Func fvl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","v") Trans("v") EndFunc Func fwl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","w") Trans("w") EndFunc Func fxl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","x") Trans("x") EndFunc Func fyl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","y") Trans("y") EndFunc Func fzl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","z") Trans("z") EndFunc Func f0l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","0") Trans("0") EndFunc Func f1l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","1") Trans("1") EndFunc Func f2l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","2") Trans("2") EndFunc Func f3l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","3") Trans("3") EndFunc Func f4l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","4") Trans("4") EndFunc Func f5l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","5") Trans("5")) EndFunc Func f6l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","6") Trans("6") EndFunc Func f7l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","7") Trans("7") EndFunc Func f8l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","8") Trans("8") EndFunc Func f9l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","9") Trans("9") EndFunc Func fAU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","A") Trans("A") EndFunc Func fBU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","B") Trans("B") EndFunc Func fCU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","C") Trans("C") EndFunc Func fDU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","D") Trans("D") EndFunc Func fEU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","E") Trans("E") EndFunc Func fFU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","F") Trans("F") EndFunc Func fGU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","G") Trans("G") EndFunc Func fHU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","H") Trans("H") EndFunc Func fIU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","I") Trans("I") EndFunc Func fJU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","J") Trans("J") EndFunc Func fKU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","K") Trans("K") EndFunc Func fLU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","L") Trans("L") EndFunc Func fMU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","M") Trans("M") EndFunc Func fNU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","N") Trans("N") EndFunc Func fOU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","O") Trans("O") EndFunc Func fPU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","P") Trans("P") EndFunc Func fQU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","Q") Trans("Q") EndFunc Func fRU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","R") Trans("R") EndFunc Func fSU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","S") Trans("S") EndFunc Func fTU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","T") Trans("T") EndFunc Func fUU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","U") Trans("U") EndFunc Func fVU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","V") Trans("V") EndFunc Func fWU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","W") Trans("W") EndFunc Func fXU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","X") Trans("X") EndFunc Func fYU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","Y") Trans("Y") EndFunc Func fZU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","Z") Trans("Z") EndFunc Func fExcla();! ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","{!}") Trans("!") EndFunc Func fDollar();$ ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","$") Trans("$") EndFunc Func fPerc();% ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","%") Trans("%") EndFunc Func fNper();& ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","&") Trans("&") EndFunc Func fLBracket();( ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","(") Trans("(") EndFunc Func fRBracket() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]",")") Trans(")") EndFunc Func fBacksp() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","{BS}") Trans(Chr(8)) EndFunc Func fSpace() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]"," ") Trans(" ") EndFunc Func fEnter() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","{ENTER}") Trans(Chr(13)) EndFunc func trans($x);this should become a function to transmit a character through the SKYPE API interface. For now just a SplashTextOn SplashOff() SplashTextOn("transmitted", "asci character "&Asc($x),200,60,1000,700) EndFunc Link to comment Share on other sites More sharing options...
corey822 Posted January 5, 2008 Share Posted January 5, 2008 Please see the script below. It is the beginning of a script for real realtime chatting, character by character. The idea is that both parties have a WordPad screen and every keystroke of either party is recorded in both wordpad screens. My script is far from complete. A transmit function still needs to be written, probably using the Skype API. Also, I will need some kind of "receive" function. However, I have a few questions about the script as it is at this moment: Why does'nt it work for a ! character? Why does'nt it work for a $ character? As you can see, this is a long and boring script. Is there a shorter and more intelligent way to do this? Thank you for reading this and thank you in advance for you advice. Tom CODERun("C:\Program Files\Windows NT\Bureau-accessoires\WordPad.exe", "", @SW_MAXIMIZE) HotKeySet("a","fal");fal=Function a lowercase HotKeySet("b","fbl") HotKeySet("c","fcl") HotKeySet("d","fdl") HotKeySet("e","fel") HotKeySet("f","ffl") HotKeySet("g","fgl") HotKeySet("h","fhl") HotKeySet("i","fil") HotKeySet("j","fjl") HotKeySet("k","fkl") HotKeySet("l","fll") HotKeySet("m","fml") HotKeySet("n","fnl") HotKeySet("o","fol") HotKeySet("p","fpl") HotKeySet("q","fql") HotKeySet("r","frl") HotKeySet("s","fsl") HotKeySet("t","ftl") HotKeySet("u","ful") HotKeySet("v","fvl") HotKeySet("w","fwl") HotKeySet("x","fxl") HotKeySet("y","fyl") HotKeySet("z","fzl") HotKeySet("0","f0l") HotKeySet("1","f1l") HotKeySet("2","f2l") HotKeySet("3","f3l") HotKeySet("4","f4l") HotKeySet("5","f5l") HotKeySet("6","f6l") HotKeySet("7","f7l") HotKeySet("8","f8l") HotKeySet("9","f9l") HotKeySet("A","fAU");fAU=Function A Uppercase HotKeySet("B","fBU") HotKeySet("C","fCU") HotKeySet("D","fDU") HotKeySet("E","fEU") HotKeySet("F","fFU") HotKeySet("G","fGU") HotKeySet("H","fHU") HotKeySet("I","fIU") HotKeySet("J","fJU") HotKeySet("K","fKU") HotKeySet("L","fLU") HotKeySet("M","fMU") HotKeySet("N","fNU") HotKeySet("O","fOU") HotKeySet("P","fPU") HotKeySet("Q","fQU") HotKeySet("R","fRU") HotKeySet("S","fSU") HotKeySet("T","fTU") HotKeySet("U","fUU") HotKeySet("V","fVU") HotKeySet("W","fWU") HotKeySet("X","fXU") HotKeySet("Y","fYU") HotKeySet("Z","fZU") HotKeySet("{!}","fExcla") HotKeySet("{ASC(036)}","fDollar") HotKeySet("%","fPerc") HotKeySet("&","fNper") HotKeySet("(","fLBracket") HotKeySet(")","fRBracket") HotkeySet("{BS}","fBacksp") HotkeySet(" ", "fSpace") HotKeySet("{ENTER}", "fEnter") While 1 Sleep(100) WEnd Func fal() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","a") Trans("a") EndFunc Func fbl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","b") Trans("b") EndFunc Func fcl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","c") Trans("c") EndFunc Func fdl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","d") Trans("d") EndFunc Func fel() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","e") Trans("e") EndFunc Func ffl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","f") Trans("f") EndFunc Func fgl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","g") Trans("g") EndFunc Func fhl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","h") Trans("h") EndFunc Func fil() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","i") Trans("i") EndFunc Func fjl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","j") Trans("j") EndFunc Func fkl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","k") Trans("k") EndFunc Func fll() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","l") Trans("l") EndFunc Func fml() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","m") Trans("m") EndFunc Func fnl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","n") Trans("n") EndFunc Func fol() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","o") Trans("o") EndFunc Func fpl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","p") Trans("p") EndFunc Func fql() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","q") Trans("q") EndFunc Func frl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","r") Trans("r") EndFunc Func fsl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","s") Trans("s") EndFunc Func ftl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","t") Trans("t") EndFunc Func ful() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","u") Trans("u") EndFunc Func fvl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","v") Trans("v") EndFunc Func fwl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","w") Trans("w") EndFunc Func fxl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","x") Trans("x") EndFunc Func fyl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","y") Trans("y") EndFunc Func fzl() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","z") Trans("z") EndFunc Func f0l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","0") Trans("0") EndFunc Func f1l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","1") Trans("1") EndFunc Func f2l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","2") Trans("2") EndFunc Func f3l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","3") Trans("3") EndFunc Func f4l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","4") Trans("4") EndFunc Func f5l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","5") Trans("5")) EndFunc Func f6l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","6") Trans("6") EndFunc Func f7l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","7") Trans("7") EndFunc Func f8l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","8") Trans("8") EndFunc Func f9l() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","9") Trans("9") EndFunc Func fAU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","A") Trans("A") EndFunc Func fBU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","B") Trans("B") EndFunc Func fCU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","C") Trans("C") EndFunc Func fDU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","D") Trans("D") EndFunc Func fEU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","E") Trans("E") EndFunc Func fFU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","F") Trans("F") EndFunc Func fGU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","G") Trans("G") EndFunc Func fHU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","H") Trans("H") EndFunc Func fIU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","I") Trans("I") EndFunc Func fJU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","J") Trans("J") EndFunc Func fKU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","K") Trans("K") EndFunc Func fLU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","L") Trans("L") EndFunc Func fMU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","M") Trans("M") EndFunc Func fNU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","N") Trans("N") EndFunc Func fOU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","O") Trans("O") EndFunc Func fPU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","P") Trans("P") EndFunc Func fQU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","Q") Trans("Q") EndFunc Func fRU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","R") Trans("R") EndFunc Func fSU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","S") Trans("S") EndFunc Func fTU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","T") Trans("T") EndFunc Func fUU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","U") Trans("U") EndFunc Func fVU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","V") Trans("V") EndFunc Func fWU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","W") Trans("W") EndFunc Func fXU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","X") Trans("X") EndFunc Func fYU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","Y") Trans("Y") EndFunc Func fZU() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","Z") Trans("Z") EndFunc Func fExcla();! ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","{!}") Trans("!") EndFunc Func fDollar();$ ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","$") Trans("$") EndFunc Func fPerc();% ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","%") Trans("%") EndFunc Func fNper();& ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","&") Trans("&") EndFunc Func fLBracket();( ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","(") Trans("(") EndFunc Func fRBracket() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]",")") Trans(")") EndFunc Func fBacksp() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","{BS}") Trans(Chr(8)) EndFunc Func fSpace() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]"," ") Trans(" ") EndFunc Func fEnter() ControlSend("Document - WordPad","","[CLASS:RICHEDIT50W; INSTANCE:1]","{ENTER}") Trans(Chr(13)) EndFunc func trans($x);this should become a function to transmit a character through the SKYPE API interface. For now just a SplashTextOn SplashOff() SplashTextOn("transmitted", "asci character "&Asc($x),200,60,1000,700) EndFunc real time chatting? never heard of it in notepad before where and when are u gonna release this script? is it over net work or internet? cheers C.W C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake Link to comment Share on other sites More sharing options...
tomtomtom Posted January 5, 2008 Author Share Posted January 5, 2008 I can't predict when I will release this script, because I am just a beginner in AutoIT. If I ever get it working, then I see it as my duty to release it on this forum. It would interface to Skype and it would work on Internet. If you look at www.skypetelex.com then you can download a working C++ version. That was partly based on somebody else's program. Now I am trying to develop an AutoIT version. Some people prefer this kind of character-by-character chatting because they feel that it is more natural than the usual message-by-message chatting. However: my question was just about my script as it is. Why does'nt it work for ! and $. Is there a simpler way to do all this. Tom Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 5, 2008 Share Posted January 5, 2008 this sounds really neat If you need help let me know [center][/center] Link to comment Share on other sites More sharing options...
corey822 Posted January 5, 2008 Share Posted January 5, 2008 this sounds really neatIf you need help let me knowi think he is asking for help lol did u even read his post?cheers C.W C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake Link to comment Share on other sites More sharing options...
tomtomtom Posted January 9, 2008 Author Share Posted January 9, 2008 May I rephrase the main part of my question? The HotKeySet function in the script below, returns a 0. Which means: not successful. Consequently, the exclamation mark is not recognised. Am I doing something wrong? Tom CODE$m1=HotKeySet("{!}","fu1") MsgBox(1,"returnvalue" , $m1) While 1 sleep(100) WEnd Func fu1() Msgbox(1,"recognised","exclamationmark") EndFunc Link to comment Share on other sites More sharing options...
DW1 Posted January 9, 2008 Share Posted January 9, 2008 $m1=HotKeySet("+1","fu1") MsgBox(1,"returnvalue" , $m1) While 1 sleep(100) WEnd Func fu1() Msgbox(1,"recognised","exclamationmark") EndFunc AutoIt3 Online Help Link to comment Share on other sites More sharing options...
SpookMeister Posted January 9, 2008 Share Posted January 9, 2008 I don't know the solution... but I believe your problem is that "!" is a modifier meaning ALT to the HotKeySet function.. as in "!F4" = ALT-F4 [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
DW1 Posted January 9, 2008 Share Posted January 9, 2008 "+1" = shift 1 = ! AutoIt3 Online Help Link to comment Share on other sites More sharing options...
tomtomtom Posted January 9, 2008 Author Share Posted January 9, 2008 "+1" = shift 1 = !Thank you, Danwilli. That is a practical workaround that I had'nt thought of. I will use that suggestion. However, there are two questions that keep nagging me. First question: is shift 1 always =1? On every normal keyboard? And second question: The documentation says that HotKeySet should be used the same way as Send. And Send("{!}") is the way to send an exclamation mark. So am I misreading the documentation?Nevertheless: thanks again. This helps me forward.Tom Link to comment Share on other sites More sharing options...
DW1 Posted January 9, 2008 Share Posted January 9, 2008 If you run into problems that hotkeyset cannot handle, then you may want to look into the _IsPressed() function. I like _IsPressed, because it does not 'steal' keys from other applications. Here is an example of _IsPressed() : #include<misc.au3> ConsoleWrite( "console debug:" ) While 1 For $i = 0 To 255 If _IsPressed(Hex($i)) Then If _IsPressed(160) Then $shift = 1 While _IsPressed( Hex($i) ) ; do nothing WEnd ConsoleWrite( $i & " = " & Chr($i) & @CRLF) EndIf Next WEnd AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now