2o2 Posted June 21, 2007 Share Posted June 21, 2007 here is my code. I posted the other day and followed the instructions of some other guy and they did not work. how do i make it so that my notepad gui will accept files when they are draged into the notepad box thanks -isaac expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <String.au3> #[ÛYH ÛZØË]LÉÝÂÚ[ÛYH ÚYK]LÉÝÂÚ[ÛYH ÑÝZUX]LÉÝ¢6æ6ÇVFRfÇCµ6÷VæBæS2fwC°¢6æ6ÇVFRfÇC¶fÆRæS2fwC° ¤vÆö&Âb33c´gVæ7FöÌ)±½°ÀÌØí]É¥Ñ()!½ÑåÍÐ ÅÕ½ÐííM ôÅÕ½Ðì°ÅÕ½ÐíÍÁÅÕ½Ðì¤)!½Ñ-ySet("{TAB}", "tab") HotKeySet("^s", "saI][ÝÊBÝÙ^Ù] ][Ý×É][ÝË ][ÝÛÜ[][ÝÊBÝÙ^Ù] ][Ý×][C²ÂgV÷C·&VbgV÷C²¤÷D¶W6WBgV÷CµçBgV÷C²ÂgV÷C¶æWwF"gV÷C²¤÷D¶W6Ð ÅÕ½ÐíyíÑôÅÕ½Ðì°ÅÕ½Ðí±½Í±°ÅÕ½Ðì¤((I¥½¸MQIP-½U$ÍÑon ### Form=c:\program files\koda\templates\tabbed pageËÞÌÍÙÕXYHÕRPÜX]J ][ÝÚTY ][ÝË ÌËNJBÕRTWD6öâgV÷C²gV÷C² ¢b33c·vW2ÒuT7G&Ä7&VFUF"ÂRÂ3bÂ#¢b33cQM¡ÐÄôU% Ñɱ ÉÑQ%Ñ´ ÅÕ½Ðí½Õµ¹ÐÄÅÕ½Ðì¤)U% ÑɱMÑMÑÑ-1,$GUI_SHOW) $doc1 = GUICtrlCreateEdit("", 12, 42, 580 LË]Ô ÌÍÑT×ÐUUÕÐÔÓ ÌÍÑT×ÐUUÒÐÔÓ ÌÍÑT×ÕÐSUT 33cµu5õe45$ôÄÂÂb33cµu5ôUô44UDdÄU2¤wV7G&Ç6WG7FFRb33c¶Fö3Âb33c´U%}I=A AQ¤)U% ÑɱMÑÑ ´Ä°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØíQM¡ÐÈôU% ÑɱreateTabItem("Document 2") $doc2 = GUICtrlCreateEdit(&quoÉ][ÝËL N LË]Ô ÌÍÑT×ÐUUÕÐÔÓ ÌÍÑT×ÐUUÒÐÔÓb33c´U5õtåE$UEU$âÂb33cµu5õe45$ôÄÂÂb33cµu5ôUô44UDdÄU2¤wV7G&Ç6WG7FÑ ÀÌØíÝɥѰÀÌØíU%}I=A AQ¤)U% ÑɱMÑÑ ´Ä°ÅÕ½ÐìÅÕ½Ðì¤(À6;TabSheet3 = GUICtrlCreateTabItem("Document 3") $doc3 = ÕRPÝÜX]QY] ][ÝÉ][ÝËL N LË]Ô ÌÍÑT×ÐUUÕÐÔÓÂb33c´U5ôUDô45$ôÄÂÂb33c´U5õtåE$UEU$âÂb33cµu5õe45$ôÄÂÂb33cµu5ôUô44UQ%1L¤¤)Õ¥ÑɱÍÑÍÑÑ ÀÌØí½Ì°ÀÌØíU%}I=A AQ¤)U% ÑɱMÑÑ 1, "") GUICtrlCreateTabItem("") $menu = GUICtrlCre]SY[J ][ÝÑ[I][ÝÊBÌÍÛÜ[HÕRPÝÜX]SY[R][J ][ÝÓÜ[ݲògV÷C²Âb33c¶ÖVçR¢b33c·6fRÒuT7G&Ä7&VFTÖVçTFVÒgV÷Cµ6fR7G&ÂÌÅÕ½Ðì°ÀÌØíµ¹Ô¤(ÀÌØíÍÙÌôÕ¥ÑɱÉѵ¹Õ¥Ñ´ ÅÕ½ÐíMÙÌÅÕt;, $menu) $Encrypter = GUICtrlCreateMenuitem ("&Encrypt][ÝË ÌÍÛY[JBÌÍÑXÜHÕRPÝÜX]SY[Z][H ][ÝÉ[ÑXÜBgV÷C²Âb33c¶ÖVçR¢b33cµ7V·GBÒuT7G&Ä7&VFTÖVçTFVÒb33²f×µ7¬QáÐÌäì°ÀÌØíµ¹Ô¤(ÀÌØíá¥ÐôU% Ñɱ ÉÑ5¹Õ%Ñ´ ÅÕ½Ðíá¥ÐÅÕ½;, $menu) $about = GUICtrlCreateMenuItem("About", $ÛY[JBÌÍÙY]HÕRPÝÜX]SY[J ][ÝÑY] ][ÝÊBÌÍÝ[ÈHÕRPÝ7&VFTÖVçTFVÒgV÷CµVæFò7G&²¢gV÷C²Âb33c¶VFB¢b33c·&VbÒuT7G&Ä7Ñ5¹Õ%Ñ´ ÅÕ½Ðí½¹Ð ÑÉ°¬ÅÕ½Ðì°ÀÌØí¥Ð¤(ÀÌØíÕÐôU% Ñɱ ÉeMenuItem("Cut Ctrl + x", $edit) $copy = GUICtrlCreateM[R][J ][ÝÐÛÜHÝ ÈÉ][ÝË ÌÍÙY] BÌÍÜÝHHÕRPÝÜX]SYçTFVÒgV÷Cµ7FR7G&²bgV÷C²Âb33c¶VFB ¤uT7G&Ä7&VFTw&÷WgV÷C²g½Ðì°´ää°´ää°Ä°Ä¤)U%MÑMÑÑ¡M]}M!=¤(¹I¥½¸9-½U$ÍÑon ### Func newtab() $Functions = Not $Functions While &ÌÍÑ[Ý[ÛÂÛY L BÕRPÝÙ]]JLK ][ÝÉ][ÝÊBb33cµF%6VWC"ÒuT7G&Ä7&VFUF$FVÒgV÷C´æWrF"gV÷C²¢ÀÌØí¹Ý½ôU% Ñɱ ÉѥРÅÕ½ÐìÅÕ½Ðì°ÄØ°ÄÈà°ÌàÔ°ÈÔÜ° ¥Ñ=H ÀÌ;ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL,&ÌÍÕÔ×ÑVÐPÐÑTSTÊJBBQÝZXÝÙ]Ý]J ÌÍÛ]ÙØË ÌÍÑÕRWÑÔPÐÑTTB¢WDÆö÷¢tVæ@¤VæDgVæ0 ¤gVæ26Æ÷6VÆ¢b33c´gVæ7Föç29½ÐÀÌØíչѥ½¹Ì(]¡¥±ÀÌØíչѥ½¹Ì(M±À ÄÀÀ¤(}UICtrlTabDeleteAllItems($pages) ExitLoop WEnd EndFunc While 1 GuiÝÙ]Ý]J ÌÍÝÜ]K ÌÍÑÕRWÑÔPÐÑTQ B[H ÌÍÝÚXÙHHØÜX]gV÷Cµ6å7fö6RgV÷C²¢b33cµ&FRÒb33c·fö6Rå&FR¢b33cµföÆÖRÒb3ÌØíÙ½¥¹Y½±Õµ($ÀÌØíµÍôÕ¥Ñ5Í ¤(%M±Ð()Í ÀÌØíµÍôÀÌØíc1) $write = $doc1 Case ($msg = $doc2) $write = ÌÍÙØÌØÙH ÌÍÛÙÈH ÌÍÙØÌÊBIÌÍÝÜ]HH ÌÍÙØÌÂÝZXÝWG7FFRb33c·w&FRÂb33c´uTôE$õ44UDTB¢¢¢66Rb33c¶×6rÒÀÌØíU%}Y9Q} 1=M(á¥Ñ1½½À( ÍÀÌØí5ÍôÀÌØíÍÙ( $SaveDir = FileSaveDialog("Save",@MyDocumentsDir, ][ÝÕ^ØÝ[Y[ _ÙXÝHØÝ[Y[ XÝ _]]Ú]ØØÝ[Y[ ]LÊI]÷C²Ãb¢7vF6uT7G&Å&VBb33c·vW2¢66R¢ÀÌØíÑáÐôU% ÑɱI ÀÌØí½Ä¤($$$$$ÀÌØíÝÉ¥Ñô#036;doc1 Case 1 $text = GUICtrlRead($docBBBBBIÌÍÝÜ]HH ÌÍÙØÌØÙHb33c·FWBÒuT7G&Å&VBb33c¶Fö32 b33c·w&FRÒb33c¶Fö30¢¹MÝ¥Ñ (ÀÌØí¥±¡¹±ô¥±=Á¸ ÀÌØíM٥ȰȤ( FileWrite($filehandle, $text) FileClose($[Z[JBØÙH ÌÍÛÙÈH ÌÍÛÜ[ ÌÍÓÜ[HfÆT÷VäFÆörgV÷C´÷VâgV÷C²Â×Fö7VÖVçG4F"ÂgV÷CµFWBFö7VÖVçB¢çGBñMÕɽյ¹Ð ¨¹¥Ð¥ñÕѽ¥Ð½Õµ¹Ð ¨¹Ô̤ÅÕ½Ðì°Äؤ(ÀÌØtext = FileRead($OpenDir) GUICtrlSetData($TabSheet1, ÌÍÓÜ[BÕRPÝÙ]]J ÌÍÙØÌK ÌÍÕ^ BBBBPØÙb33c¶×6rÒb33cµ7V·GB b33c¶V×GÒgV÷C²gV÷C° b33c·GC'7 ôÕ¥ ÑɱI ÀÌØíÝɥѤ($$%%ÀÌØíÑáÐÉÍÁ ôôÀÌØíµÁÑäQ¡¸($ Speak("There is no text too reed", 0, 100) ;sounded out forX^[][HÛ]IÌÌÎÉÌÌÎÉÌÌÎÂBBBNÒØXXÈØÚÜÉÌÌÎÉÌÌÎÉÌÌÎÈÛÈÙÈX]b333° VÇ6P 7V²b33c·GC'7VV6 VæD`¢66RbÀÌØíµÍôÀÌØí¹ÉåÁÑȤ($$$ÀÌØí¹ÉÐôU% ÑɱI ÀÌØíÝɥѤ( $word2encrypt = InputBox("Password", "What do you Ø[HÜÝÛÜÈ[ÜH^ÈOÉ][ÝÊBÕRPÝÙ]Fb33c·w&FRÂõ7G&ætVæ7'BÂb33c¶Væ7'BÂb33c·v÷&C&Væ7'B ¢ Í ÀÌØíµÍôÀÌØíÉåÁÑȤ($$$ÀÌØíÉåÐôÕ¥ ÑɱI ÀÌØírite) $word2decrypt = InputBox("Password", "ÔXÙH[HÜÝÛÜÈXÜH^ ][ÝÊBÕRPÝÙ]FFb33c·w&FRÂõ7G&ætVæ7'BÂb33c¶FV7'BÂb33c·v÷&C&FV7'B ¤Í ÀÌØíµÍô´Ì¤(á¥Ð(%Í ÀÌØíµÍôÀÌØíÕФ(͹ Åot;^x") Case ($msg = $exit) Exit Case ($msg = $ÜØ]XÊB ÌÍÜÙÜØ]XÈH[TØ]QX[ÙÊ ][ÝÔØ]I][ÝËÚÝÜÛÛÖöæF"ÂgV÷C·FWBfÆW2¢çGC²¢æFö2gV÷C²¢fÆTFVÆWFRb33c·&öw6fV̤(¥±]É¥Ñ ÀÌØíÁɽÍÙÌ°U% ÑɱI ÀÌØíÝɥѤ¤)Í ÀÌØíµÍ = $about) msgbox(0, "iPad", "iPad, Created by IsaaÈ][HÈHÝYZÙHÛÛÛÛ[YÚ[È]]Ú]É][ÝÈ [ÈÚLÊHfײ6"fײgV÷CµFæ·2f÷"G'ærBb333²WFFW26öÖær6ööââÉÍ¥½¸Ä¸Ø¸ÅÕ½ÐìµÀì¡È Ä̤µÀì¡È ÄÀ¤µÀìÅÕ½Ðìµ%ÍÅÕ½Ðì¤)Í ($msg = $copy) send("^c") Case ($msg = $ÝJBÙ[ ][Ý×][ÝÊBØÙH ÌÍÛÙÈH ÌÍÜY ÌÍØÙÛÒô6ö÷6TföçB¢bW'&÷"FVà¢6ÆVW¢VÇ6P¢uT7G±Mѽ¹Ð ÀÌØíÝɥѰÀÌØí½¹ÑlÍt°ÀÌØí½¹ÑlÑt°ÀÌØí½¹ÑlÅt°ÀÌØcfont[2]) GUICtrlSetColor($write, $cfont[7]) EndIf EÙ[XÝÑ[[ÈÜXZÊ ÌÍÕ^ ÌÍÔ]K ÌÍÕÛYJBÌÍÝÚXÙKFRÒb33cµ&FP¢b33c·fö6RåföÇVÖRÒb33cµföÆÖP¢b33c·fö6Rå7V²b33cµFáФ)¹Õ¹()Õ¹Ñ ¤)͹ ÅÕ½ÐìÅÕ½Ðì°ÀÌØíÝɥѤ)¹Õ¹()Õ¹ave() $SaveDir = FileSaveDialog("Save",@MyDocumentsDi ][ÝÕ^ØÝ[Y[ _ÙXÝHØÝ[Y[ XÝ _]]Ú]ØØÝ[Y[ ]LÊgV÷C²Ãb¢7vF6uT7G&Å&VBb33c·vW2¢66RÀ(ÀÌØíÑáÐôU% ÑɱI ÀÌØí½Ä¤($$$$$ÀÌØíÝÉ¥Ñ= $doc1 Case 1 $text = GUICtrlRead($ØÌBBBBBIÌÍÝÜ]HH ÌÍÙØÌØÙHb33c·FWBÒuT7G&Å&VBb33c¶Fö32 b33c·w&FRÒb33c¶Fö30¢¹MÝ¥Ñ (ÀÌØí¥±¡¹±ô¥±=Á¸ ÀÌØíM٥ȰȤ( FileWrite($filehandle, $text) FileClose(�ÍÙ[Z[JB[[Â[ÈØØJ B^][[Â[ÈÜ[ BÌÍÜÙÛÜVâÒfÆT÷VäFÆörgV÷C´÷VâgV÷C²ÄFW6·F÷6öÖÖöæF"ÂgV÷C·FWBfÆW2¢çáÐ쨹½¤ÅÕ½Ðì°Ä¤)%ÉɽÈQ¡¸)M±À ÄÀ¤)±Í)U% ÑɱMÑÑ ÀÌØíÝÉ¥Ñ, FileRead($progopen)) endif EndFunc Func pref() $cfont = _CÛÜÙQÛ BYÜ[ÛY L B[ÙBÕRPÝÙ]föçBb33c·w&FRÂb33c¶6föçE³5ÒÂb33c¶6föçE³EÒÂb33c¶6föçE³ÒÂb33c¶6föÑlÉt¤(U% ÑɱMÑ ½±½È ÀÌØíÝɥѰÀÌØí½¹ÑlÝt¤(¹%)¹Õ¹ Rick rack ree, kick 'em in the knee.Rick rack rass, kick 'em in the other knee! Link to comment Share on other sites More sharing options...
2o2 Posted June 22, 2007 Author Share Posted June 22, 2007 Wrong section...wtf does wrong section mean and if it means i posted in the wrong section thanks for telling me rather than answering my question (sarcasm) Rick rack ree, kick 'em in the knee.Rick rack rass, kick 'em in the other knee! Link to comment Share on other sites More sharing options...
smashly Posted June 22, 2007 Share Posted June 22, 2007 One of the reason your having probs with the drop files is $WS_EX_ACCEPTFILES should be used as an extended style on your Main Gui window, Not on the control istself.. Eg: oÝ÷ Ù«¢+ØÀÌØí½ÄôU% Ñɱ ÉѥРÅÕ½ÐìÅÕ½Ðì°ÄÈ°ÐÈ°ÔàÀ°ÔÈÜ° ¥Ñ=H ÀÌØíS_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL,�ÍÕÔ×ÑVÐPÐÑTSTÊJHÉËKHÝZÙH Cheers Link to comment Share on other sites More sharing options...
martin Posted June 22, 2007 Share Posted June 22, 2007 Here is a small example of dragging and dropping a file, but as I said in my reply to you in the previous thread on this, it only drops the file name. #include <guiconstants.au3> $main = GUICreate('dragdrop',500,500,200,200,-1,$WS_EX_ACCEPTFILES) $write = GUICtrlCreateEdit('$w1',5,20,450,450) Guictrlsetstate($write,$GUI_DROPACCEPTED ) guisetstate() while 1 $msg = GUIGetMsg() if $msg = $GUI_EVENT_CLOSE then exitloop WEnd To make the file contents appear, as happens with notepad say, requires a bit more. If no one else gives a method to do this I will see if I can do it. Maybe tomorrow. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
martin Posted June 23, 2007 Share Posted June 23, 2007 Here is a simple example of dropping a file into an edit so that the text from the file is loaded into the edit, but you have to use onevents so your script would need rewriting. #include <GUIConstants.au3> #include <guiedit.au3> Opt("GUIOnEventMode", 1) GUICreate('Drop file into edit', 300, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, 'Quit') $ip = GUICtrlCreateEdit('', 5, 5, 290, 200) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetOnEvent($GUI_EVENT_DROPPED, 'DropFile') GUISetState() While 1 Sleep(200) WEnd Func DropFile() If @GUI_DropId <> $ip Then Return $f = @GUI_DragFile $f = StringReplace($f,@CRLF,'') $t = FileRead($f) GUICtrlSetData($ip,$t) $f = '' EndFunc Func Quit() Exit EndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
2o2 Posted June 23, 2007 Author Share Posted June 23, 2007 Here is a simple example of dropping a file into an edit so that the text from the file is loaded into the edit, but you have to use onevents so your script would need rewriting. #include <GUIConstants.au3> #include <guiedit.au3> Opt("GUIOnEventMode", 1) GUICreate('Drop file into edit', 300, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, 'Quit') $ip = GUICtrlCreateEdit('', 5, 5, 290, 200) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetOnEvent($GUI_EVENT_DROPPED, 'DropFile') GUISetState() While 1 Sleep(200) WEnd Func DropFile() If @GUI_DropId <> $ip Then Return $f = @GUI_DragFile $f = StringReplace($f,@CRLF,'') $t = FileRead($f) GUICtrlSetData($ip,$t) $f = '' EndFunc Func Quit() Exit EndFunc thank you soooooo much! it worked. now the only problem is that the rest of the script does not. here it is expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <String.au3> Ú[ÛYH ÛZØË]LÉÝÂÚ[ÛYH ÚYK]LÉÝÂÚ[ÛYH ÔÛÝ[]LÉÝ¢6æ6ÇVFRfÇC¶fÆRæS2fwC°¢6æ6ÇVFRfÇC¶wVVFBæS2fwC° ¤÷BgV÷C´uTöäWfVÑ5½ÅÕ½Ðì°Ä¤((ÀÌØìÄÈôU% ÉÑ ÅÕ½Ðí¥AÅÕ½Ðì°ØÀÀ°ÐÀÀ°´Ä°´Ä°1, $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, 'Quit&ÌÎNÊBÝZÙ]ØÛÛÜMÐQ BÝÙ^Ù] ][ÝÞÑTÐßI][ÝË ][ÝÙØØI]÷C²¤÷D¶W6WBgV÷CµçbgV÷C²ÂgV÷C·7FRgV÷C²¤÷D¶W6WBgV÷C·µD'ÒgV÷ì°ÅÕ½ÐíÑÅÕ½Ðì¤)!½ÑåÍÐ ÅÕ½ÐíyÅÕ½Ðì°ÅÕ½Ðí½ÁäÅÕ½Ðì¤)!½Ñ-åMÐ uot;^s", "save") Hotkeyset("^o", "open")ÝÙ^Ù] ][Ý× ][ÝË ][ÝØÝ] ][ÝÊBÝÙ^Ù] ][Ý×][ÝË ][Ý&VbgV÷C² ¤vÆö&Âb33c´gVæ7Föç0¤vÆö&Âb33c·&öv÷Và¤vÆö&Âb33c·&öwÙÌ()U% ÑɱMÑMÑÑ ´Ä°ÀÌØíU%}I=A AQ¤)U%MÑ=¹Ù¹Ð ÀÌØíU%}VENT_DROPPED, 'DropFile') $menu = GUICtrlCreateMenu("FilI][ÝÊBÌÍÛÜ[HÕRPÝÜX]SY[R][J ][ÝÓÜ[Ý ÈÉ][ÝË ÌͶÖVçR¢b33c·6fRÒuT7G&Ä7&VFTÖVçTFVÒgV÷Cµ6fR7G&²2gV÷C²Âb33c¶¹Ô¤(ÀÌØíÍÙÌôÕ¥ÑɱÉѵ¹Õ¥Ñ´ ÅÕ½ÐíMÙÌÅÕ½Ðì°ÀÌØíµ¹Ô¤(#036;Encrypter = GUICtrlCreateMenuitem ("&Encrypt", $menJBÌÍÑXÜHÕRPÝÜX]SY[Z][H ][ÝÉ[ÑXÜ ][ÝË ÌÍÖVçR¢b33cµ7V·GBÒuT7G&Ä7&VFTÖVçTFVÒb33²f×µ7V²FWBb33²Âb3ÌØíµ¹Ô¤(ÀÌØíá¥ÐôU% Ñɱ ÉÑ5¹Õ%Ñ´ ÅÕ½Ðíá¥ÐÅÕ½Ðì°ÀÌØíµ¹Ô¤(036;about = GUICtrlCreateMenuItem("About", $menu) $editHÕRPÝÜX]SY[J ][ÝÑY] ][ÝÊBÌÍÝ[ÈHÕRPÝÜX]SY[R][J V÷CµVæFò7G&²¢gV÷C²Âb33c¶VFB¢b33c·&VbÒuT7G&Ä7&VFTÖVçTFVÒgVÐí½¹Ð ÑÉ°¬ÅÕ½Ðì°ÀÌØí¥Ð¤(ÀÌØíÕÐôU% Ñɱ ÉÑ5¹Õ%Ñ´ ÅÕ½Ðíut Ctrl + x", $edit) $copy = GUICtrlCreateMenuItem("CopHÝ ÈÉ][ÝË ÌÍÙY] BÌÍÜÝHHÕRPÝÜX]SY[R][J ][ÝÔÝR7G&²bgV÷C²Âb33c¶VFB¢b33c·w&FRÒuT7G&Ä7&VFTVFBgV÷C²gV÷C²ÂÔ°Ô°ÔäÀ°ÌÜÀ° ¥Ñ=H ÀÌØíM}UQ=YM I=10°ÀÌØíM}UQ=!M I=10°ÀÌØíM}]TRETURN,$WS_VSCROLL)) GUISetState() while 1 sleep(200) Dim $ÝÚXÙHHØÜX]J ][ÝÔØKÜÚXÙI][ÝÊHÝZXÝÙ]Û ][ÝÓXÚYHØç2Væ6öFRgV÷C²Â"¢b33c·6bÒuT7G&Å&VBb33c·w&FR¢b33í¥IÍÕ±ÐôU%Ñ5Í ¤(M±Ð($% Í ÀÌØí¥IÍÕ±ÐôÀÌØíMÁÑáФ( $empty = "" $txt2speech = GuiCtrlRead($write)BBRY ÌÍÝÜYXÚOH ÌÍÙ[H[BBBTÜXZÊ ][ÝÕHÈÈ^Föò&VVBgV÷C²Â ·6÷VæFVB÷WBf÷"Ö×VÒ6Æ&Gb333²b333²b333($$$$í%ÍI½ÌÌÌìÌÌìÌÌìͼ½ÌµÑ ÌÌì($$$$$%±Í($$%MÁ¬ ÀÌ;txt2speech, 0, 100) EndIf Case ($iResult = $Encrypter)BBIÌÍÙ[ÜHÕRPÝXY ÌÍÝÜ]JB ÌÍÝÛÜ[ÜHçWD&÷gV÷Cµ77v÷&BgV÷C²ÂgV÷CµvBFò÷RvçBFR77v÷&BFòVæ7'ÐÑ¡ÑáÐѼüÅÕ½Ðì¤(U% ÑɱMÑÑ ÀÌØíÝɥѰ}MÑÉ¥¹¹ypt(1, $encrt, $word2encrypt)) Case ($iResult = ÌÍÑXÜBBBIÌÍÙXÜ]HÝZPÝXY ÌÍÝÜ]JB Ìc·v÷&C&FV7'BÒçWD&÷gV÷Cµ77v÷&BgV÷C²ÂgV÷CµÆV6RVçFW"FR77½ÉѼÉåÁÐÑ¡ÑáÐÅÕ½Ðì¤(U% ÑɱMÑÑ ÀÌØíÝɥѰ}MÑÉngEncrypt(0, $decryt, $word2decrypt)) case ($iResult = &ÌÍÛÜ[B ÌÍÜÙÛÜ[H[SÜ[X[ÙÊ ][ÝÓÜ[][ÝËÚÝÜÛÛ[öæF"ÂgV÷C·FWBfÆW2¢çGC²¢æFö2gV÷C²Â¢bW'&÷"FVà¢6ÆVWÄÀ¤(±Í(U% ÑɱMÑÑ ÀÌØíÝɥѰ¥±I ÀÌØíÁɽ½Á¸¤¤(ndif Case ($iResult = -3) Exit case ($iResult = $cu BÙ[ ][Ý× ][ÝÊBØÙH ÌÍÚTÝ[H ÌÍÙ^] B^]ØÙHb33c¶&W7VÇBÒb33c·6fV2¢b33c·&öw6fV2ÒfÆU6fTFÆörgV÷CµÙÅÕ½Ðì°ÍѽÁ½µµ½¹¥È°ÅÕ½ÐíÑáÐ¥±Ì ¨¹ÑáÐ쨹½¤ÅÕ½Ðì¤(¥±Delete($progsaveas) FileWrite($progsaveas, GUICtrlRead($Ü]JJBØÙH ÌÍÚTÝ[H ÌÍÜØ]JBY[Y^ÝÊ ÌÍÜÙÛÜ[HFVà¢fÆTFVÆWFRb33c·&öv÷Vâ¢fÆUw&FRb33c·&öv÷VâÂuT7G&Å&V ÀÌØíÝɥѤ¤(¹%(¥¹½Ð¥±á¥ÍÑÌ ÀÌØíÁɽ½Á¸¤Q¡¸(36;progopen = FileSaveDialog("Save", @desktopcommondir, "tex[È ÊØÊI][ÝÊB[Q[]J ÌÍÜÙÛÜ[B[UÜ]J 3c·&öv÷VâÂuT7G&Å&VBb33c·w&FR¢VæD`¦66Rb33c¶&W7VÇBÒb3Øí½ÕФ(µÍ½à À°ÅÕ½Ðí¥AÅÕ½Ðì°ÅÕ½Ðí¥A° ÉÑä%ͱմis a notepad like tool compiled using Autoit v3" & chr(13) & cL H [È ][ÝÕ[ÜÈÜZ[ÈTY ÌÌÎÈ]ÈÛÛZ[ÈÛÛÛÚ[ÛãbâgV÷C²fײ6"2fײ6"fײgV÷C²Ô62gV÷C²¦66Rb33í¥IÍÕ±ÐôÀÌØí½Áä¤( ±¥ÁAÕÐ ÀÌØíÍؤ) Í ÀÌØí¥IÍÕ±ÐôÀÌØíÁste) GUICtrlSetData($write, clipget()) Case $iResult = $Y ÌÍØÙÛHÐÚÛÜÙQÛ BYÜ[ÛY L BVÇ6P¢uT7G&Å6WDföçBb33c·w&FRÂb33c¶6föçE³5ÒÂb33c¶6föçE³EÒÂÀÌØí½¹ÑlÅt°ÀÌØí½¹ÑlÉt¤(U% ÑɱMÑ ½±½È ÀÌØíÝɥѰÀÌØíont[7]) EndIf EndSelect WEnd Func Speak($Text, $Rate, &#ÍÕÛYJBÌÍÝÚXÙK]HH ÌÍÔ]BÌÍÝÚXÙKÛ[YHH ÌÍÕÛYB3c·fö6Rå7V²b33cµFWB¤VæDgVæ0 ¤gVæ2F"§6VæBgV÷C²gV÷C²Âb3ØíÝɥѤ)¹Õ¹()Õ¹ÍÙ ¤)¥¥±á¥ÍÑÌ ÀÌØíÁɽ½Á¸¤Ñ¡¸)¥±±Ñ$progopen) FileWrite($progopen, GUICtrlRead($write)) EndIf YÝ[Y^ÝÊ ÌÍÜÙÛÜ[H[ÌÍÜÙÛÜ[H[TØ]QX[ÙÊ ][ݵ6fRgV÷C²ÂFW6·F÷6öÖÖöæF"ÂgV÷C·FWBfÆW2¢çGC²¢æFö2gV÷C²¤fÆTF±Ñ ÀÌØíÁɽ½Á¸¤)¥±]É¥Ñ ÀÌØíÁɽ½Á¸°U% ÑɱI ÀÌØíÝɥѤ¤)¹If EndFunc Func copy() clipput($sav) EndFunc func cut() clipput(�ÍÜØ]BÙ[ ][ÝÞØXÚÜÜXÙ_I][ÝÊB[[Â[ÈØØJ B^][[ÂVæ2÷Vâ¢b33c·&öv÷VâÒfÆT÷VäFÆörgV÷C´÷VâgV÷C²ÄFW6·F÷6öÖÖöæFÈ°ÅÕ½ÐíÑáÐ¥±Ì ¨¹ÑáÐ쨹½¤ÅÕ½Ðì°Ä¤)%ÉɽÈQ¡¸)M±À ÄÀ¤)±Í)UCtrlSetData($write, FileRead($progopen)) endif EndFunc Func pastJ BÝZXÝÙ]]J ÌÍÝÜ]KÛÙ] JB[[Â[ÈÜ[J BYÕRWG&÷BfÇC²fwC²b33c·w&FRFVâ&WGW&à¢b33c¶bÒuTôG&tfÆP¢b33c¶bÒ7É¥¹IÁ± ÀÌØí± I1°ÌäìÌäì¤(ÀÌØíÐô¥±I ÀÌØí¤)U% ÑɱMData($write,$t) $f = '' EndFunc Func pref() �ÍØÙÛHÐÚÛÜÙQÛ BYÜ[ÛY L B[ÙBuT7G&Å6WDföçBb33c·w&FRÂb33c¶6föçE³5ÒÂb33c¶6föçE³EÒÂb33c¶6föçE³t°ÀÌØí½¹ÑlÉt¤(U% ÑɱMÑ ½±½È ÀÌØíÝɥѰÀÌØí½¹ÑlÝt¤(EndIf EndFunc Func Quit() Exit EndFunc Rick rack ree, kick 'em in the knee.Rick rack rass, kick 'em in the other knee! Link to comment Share on other sites More sharing options...
martin Posted June 23, 2007 Share Posted June 23, 2007 (edited) here is a conversion of your script. It's not properly tested but it will give you the idea. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #NoTrayIcon #include <GUIConstants.au3> #include <String.au3> #include <misc.au3> #include <ie.au3> #include <Sound.au3> #include <file.au3> #include <guiedit.au3> Opt("GUIOnEventMode", 1) $12 = GUICreate ("iPad", 600, 400, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetOnEvent($GUI_EVENT_CLOSE, 'Quit') guisetbkcolor(0xA6CAF0) Hotkeyset("{ESC}", "Quit");was "escape" but same as "Quit". Duplicates = duplicate errors, problems, effort etc HotKeySet("^v", "paste") HotKeySet("{TAB}", "tab") Hotkeyset("^c", "copy") HotKeySet("^s", "save") Hotkeyset("^o", "open") hotkeyset("^x", "cut") hotkeyset("^f", "pref") Global $Functions Global $progopen Global $progsaveas $menu = GUICtrlCreateMenu("File") $open = GUICtrlCreateMenuItem("Open Ctrl + o", $menu) $save = GUICtrlCreateMenuItem("Save Ctrl + s", $menu) $saveas = Guictrlcreatemenuitem("Save As", $menu) $Encrypter = GUICtrlCreateMenuitem ("&Encrypt", $menu) $Decrypter = GUICtrlCreateMenuitem ("&Decrypt", $menu) $Speaktxt = GUICtrlCreateMenuItem ('&Speak Text', $menu) $exit = GUICtrlCreateMenuItem("Exit", $menu) $about = GUICtrlCreateMenuItem("About", $menu) $edit = GUICtrlCreateMenu("Edit") $undo = GUICtrlCreateMenuItem("Undo Ctrl + z", $edit) $pref = GUICtrlCreateMenuItem("Font Ctrl + f", $edit) $cut = GUICtrlCreateMenuItem("Cut Ctrl + x", $edit) $copy = GUICtrlCreateMenuItem("Copy Ctrl + c", $edit) $paste = GUICtrlCreateMenuItem("Paste Ctrl + v", $edit) $write = GUICtrlCreateEdit("", 5, 5, 590, 370, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState() GUISetOnEvent($GUI_EVENT_DROPPED, 'DropFile') GUICtrlSetOnEvent($Speaktxt,"FNSpeaktxt") GUICtrlSetOnEvent($Encrypter,"FNEncrypter") GUICtrlSetOnEvent($Decrypter,"FNDecrypter") GUICtrlSetOnEvent($open,"open") GUICtrlSetOnEvent($saveas,"FNsaveas") GUICtrlSetOnEvent($cut,"cut") GUICtrlSetOnEvent($save,"save") GUICtrlSetOnEvent($about,"FNabout") GUICtrlSetOnEvent($copy,"copy") GUICtrlSetOnEvent($paste,"paste") GUICtrlSetOnEvent($pref,"pref") GUICtrlSetOnEvent($exit,"Quit") Global $voice = ObjCreate("Sapi.SpVoice") while 1 sleep(200) ;guictrlsetfont("Lucida Sans Unicode", 12);<-----this is incorrect -see help file WEnd Func FNsaveas() $progsaveas = FileSaveDialog("Save", @desktopcommondir, "text files (*.txt;*.doc)") FileDelete($progsaveas) FileWrite($progsaveas, GUICtrlRead($write)) EndFunc Func FNabout() msgbox(0, "iPad", "iPad, Created by Isaac Flaum is a notepad like tool compiled using Autoit v3" & chr(13) & chr(10) & "Thanks For Trying iPad! Updates Coming Soon. Version 1.6." & chr(13) & chr(10) & "-Isaac") EndFunc Func FNSpeaktxt() $empty = "" $txt2speech = GuiCtrlRead($write) If $txt2speech == $empty Then Speak("There is no text too reed", 0, 100) ;sounded out for maximum clarity!!! ;Isaac Rocks!!! so does math! Else Speak($txt2speech, 0, 100) EndIf EndFunc Func FNEncrypter() $encrt = GUICtrlRead($write) $word2encrypt = InputBox("Password", "What do you want the password to encrypt the text to be?") GUICtrlSetData($write, _StringEncrypt(1, $encrt, $word2encrypt)) EndFunc Func FNDecrypter() $decryt = GuiCtrlRead($write) $word2decrypt = InputBox("Password", "Please enter the password to decrypt the text") If $word2decrypt = '' Then Return GUICtrlSetData($write, _StringEncrypt(0, $decryt, $word2decrypt)) EndFunc Func Speak($Text, $Rate, $Volme) $voice.Rate = $Rate $voice.Volume = $Volme $voice.Speak($Text) EndFunc Func tab() send(" ", $write) EndFunc func save() if fileexists($progopen) then FileDelete($progopen) FileWrite($progopen, GUICtrlRead($write)) EndIf if not fileexists($progopen) Then $progopen = FileSaveDialog("Save", @desktopcommondir, "text files (*.txt;*.doc)") FileDelete($progopen) FileWrite($progopen, GUICtrlRead($write)) EndIf EndFunc Func copy() clipput(GUICtrlRead($write)) EndFunc func cut() clipput(GUICtrlRead($write)) send("{backspace}") EndFunc func escape() Exit EndFunc func open() $progopen = FileOpenDialog("Open",@desktopcommondir, "text files(*.txt;*.doc)", 1) If @error Then Sleep(10) else GUICtrlSetData($write, FileRead($progopen)) endif EndFunc Func paste() guictrlsetdata($write, clipget()) EndFunc Func DropFile() ConsoleWrite("dropped something" & @CRLF) If @GUI_DropId <> $write Then Return $f = @GUI_DragFile $f = StringReplace($f,@CRLF,'') $t = FileRead($f) GUICtrlSetData($write,$t) $f = '' EndFunc Func pref() $cfont = _ChooseFont() If @error Then Sleep(10) Else GUICtrlSetFont($write, $cfont[3], $cfont[4], $cfont[1], $cfont[2]) GUICtrlSetColor($write, $cfont[7]) EndIf EndFunc Func Quit() Exit EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Edited June 24, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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