charactermap Posted October 12, 2009 Posted October 12, 2009 Hi! i have been trying to figure out how to paste ascii text into notepad and i think I have to send an enter command after each line. Here is one of the pictures I am trying to paste BIRTHDAY ) ( ) ( (^) (^) (^) (^) _i___i___i___i_ (_____________) |####|>o< |###| (______________) ': <~ > ^ ; ` ^ - ~ ; , HAPPY BIRTHDAY -------Gloria!!----------- ` ^ - ~ ; ^ ; `~ ; ` ^ - ~ ; ^ ; ` - ~ ; ^ ; - ~ ~ ; ^ ; `; ` `~ ; ` ~ ; ` - ~ ; ^ ; `~ ; ` ~ ; ` - ~ ; ^ ; `~ ; ~ ; ` -. ~ ;. . ^ ; `~ ; ` When i try to use the send command the script just crashes:( is there a command that input that allows this type os text? Thanks for any help
Moderators Melba23 Posted October 12, 2009 Moderators Posted October 12, 2009 charactermap,I would try using the the "raw" flag (look in the Help file for details):Global $aPic[16] = [15] $aPic[1] = "BIRTHDAY" $aPic[2] = ") ( ) (" $aPic[3] = "(^) (^) (^) (^)" $aPic[4] = "_i___i___i___i_" $aPic[5] = "(_____________)" $aPic[6] = "|####|>o< |###|" $aPic[7] = "(______________)" $aPic[8] = "': <~ > ^ ; ` ^ - ~ ; " $aPic[9] = ", HAPPY BIRTHDAY" $aPic[10] = "-------Gloria!!-----------" $aPic[11] = "` ^ - ~ ; ^ ; `~ ; ` ^ " $aPic[12] = "- ~ ; ^ ; ` - ~ ; ^ ; " $aPic[13] = "- ~ ~ ; ^ ; `; ` `~ ; `" $aPic[14] = "~ ; ` - ~ ; ^ ; `~ ; `" $aPic[15] = "~ ; ` - ~ ; ^ ; `~ ; ~ ; ` -. ~ ;. . ^ ; `~ ; ` " Run ("Notepad.exe") WinWaitActive("Untitled - Notepad") For $i = 1 To $aPic[0] Send ($aPic[$i], 1) Send ("{ENTER}") NextYou will have to play with the spacing to get the correct image.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
water Posted October 12, 2009 Posted October 12, 2009 Try to set the raw-flag in the Send command. That means change Send("Text")toSend("Text",1) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
charactermap Posted October 12, 2009 Author Posted October 12, 2009 Hi and thanks so much! @Melbaa23 when i paste your script into the script editor save and run it I gt notepad opening and autoit closes... @water when i enter this script WinWaitActive("Untitled - Notepad") Send("BIRTHDAY",1) Send(") ( ) (",1) Send("(^) (^) (^) (^)",1) Send("_i___i___i___i_",1) Send("(_____________)",1) Send("|####|>o< |###|",1) Send("(______________)",1) Send("': <~ > ^ ; ` ^ - ~ ; ",1) Send(", HAPPY BIRTHDAY",1) Send("-------Gloria!!-----------",1) Send("` ^ - ~ ; ^ ; `~ ; ` ^ ",1) Send("- ~ ; ^ ; ` - ~ ; ^ ; ",1) Send("- ~ ~ ; ^ ; `; ` `~ ; `",1) Send("~ ; ` - ~ ; ^ ; `~ ; `",1) Send("~ ; ` - ~ ; ^ ; `~ ; ~ ; ` -. ~ ;. . ^ ; `~ ; ` ",1) I get this in notepad BIRTHDAY) ( ) ((^) (^) (^) (^)_i___i___i___i_(_____________)|####|>o< |###|(______________)': <~ > ^ ; ` ^ - ~ ; , HAPPY BIRTHDAY-------Gloria!!-----------` ^ - ~ ; ^ ; `~ ; ` ^ - ~ ; ^ ; ` - ~ ; ^ ; - ~ ~ ; ^ ; `; ` `~ ; `~ ; ` - ~ ; ^ ; `~ ; `~ ; ` - ~ ; ^ ; `~ ; ~ ; ` -. ~ ;. . ^ ; `~ ; ` I have a feeling ascii art is going to be very hard for me to display. I was using a program called perfect keyboard to paste the artwork but it stopped working since it expired on windows 7
water Posted October 12, 2009 Posted October 12, 2009 Add a LF at the end of each line. WinWaitActive("Untitled - Notepad") Send("BIRTHDAY" & @LF,1) Send(") ( ) (" & @LF,1) Send("(^) (^) (^) (^)" & @LF,1) Send("_i___i___i___i_" & @LF,1) Send("(_____________)" & @LF,1) Send("|####|>o< |###|" & @LF,1) Send("(______________)" & @LF,1) Send("': <~ > ^ ; ` ^ - ~ ; " & @LF,1) Send(", HAPPY BIRTHDAY" & @LF,1) Send("-------Gloria!!-----------" & @LF,1) Send("` ^ - ~ ; ^ ; `~ ; ` ^ " & @LF,1) Send("- ~ ; ^ ; ` - ~ ; ^ ; " & @LF,1) Send("- ~ ~ ; ^ ; `; ` `~ ; `" & @LF,1) Send("~ ; ` - ~ ; ^ ; `~ ; `" & @LF,1) Send("~ ; ` - ~ ; ^ ; `~ ; ~ ; ` -. ~ ;. . ^ ; `~ ; ` " & @LF,1) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
charactermap Posted October 12, 2009 Author Posted October 12, 2009 @Melbaa23 I just checked your script again and didn't realize that there was more at the bottom. It seems to work great Thanks so much! This is great!
charactermap Posted October 12, 2009 Author Posted October 12, 2009 @water That is working too! I will try both scripts on a more complicated artwork and see if i can automate creating the new start and end commands into each line of the artwork Thanks for your help both of you! I really appreciate it!
water Posted October 12, 2009 Posted October 12, 2009 How do you create the ASCII artwork? There are ASCII artwork generators available on the internet that allow you to copy and paste the results to notepad etc. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
jvanegmond Posted October 12, 2009 Posted October 12, 2009 How do you create the ASCII artwork? There are ASCII artwork generators available on the internet that allow you to copy and paste the results to notepad etc.YOU TYPE IT.That's the beauty of ASCII artwork, nothing else required but a keyword and text processor. github.com/jvanegmond
charactermap Posted October 12, 2009 Author Posted October 12, 2009 One more quick question I can't for the life of me locate the auto text replace function...(is that what it's called?) example if I input ---birthday into notepad so that the text triggers the birthday cake. Cheers
water Posted October 12, 2009 Posted October 12, 2009 Ok, but why type it into AutoIt code which then types it into Notepad? Therefore I thought the artwork was created by another program that doesn't allow copy&paste. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
charactermap Posted October 12, 2009 Author Posted October 12, 2009 (edited) How do you create the ASCII artwork? There are ASCII artwork generators available on the internet that allow you to copy and paste the results to notepad etc. There is a cool website that has all the artwork from amazing artists . . . . . . . . .H|| . . . .__________H||___________ . . . [|.......................| . . . ||.........## --.#.......| . . . . . . . . . . . . . . ||......... . # .# ......| . . . . . .@@@@ . . . ||......... . . * .......| . . . . .@@@@@@@ . . . . . . ||........ . . -^........| . , . . .- @@@@ . . . . . . . ||.....##\ . . . ........| . | . . '_ @@@ . . . . . . . ||....##### . . /###.....| . | . . __\@ \@ . . . . . . ||....########\ \((#.....| ._\\ .(/ ) @\_/)____ . . . ||..####, . ))/ ##.......| . |(__/ / . . /|% #/ . . . ||..##### . . .'####.....| . .\___/ ----/_|-*/ . . . ||..#####\____/#####.....| . . . ,: . '( . . . . . . . . ||...######..######......| . . . |: . . \ . . . . . . ||....."""" .""""...b'ger| . . . |: . . .) . . . . . . [|_______________________| . . . |: . . .| . . . . . . . . . .H||_______H|| . . . . . . |_____,_| . . . . . . . . . .H||________\| . . . . . . .| . / ( . . . . . . . . . . .H|| . . . H|| . . . . . . .| ./\ .) . . . . . . . . . . .H|| . . . H|| . . . . . . .( .\| / . . . . . . . . . . _H||_______H||__ . . . . . .| ./'=. . . . . . . . . . H|________________| . . . . . '=>/ .\ . . . . . . . . . . . . . . . . . . . . . . ./ .\ /|/ . . . . . . . . . . . . . . . . . . .,___/| . . http://www.ascii-art.de/ascii/ Edit: I guess the board software removes the spaces so the artwork is not displayed in format. You can see the image on the homepage there at the link. btw the image looks great in the online forum editor edit2: ok i replaced the spaces with a space . now Edited October 12, 2009 by charactermap
jvanegmond Posted October 12, 2009 Posted October 12, 2009 AutoIt is a programming language. It's not a macro tool, but you can use AutoIt to create a macro tool. The functions in AutoIt are much more low level, then what you are expecting them to be. I have created a library to do what you asking (except the replace part): http://www.autoitscript.com/forum/index.php?showtopic=68422 github.com/jvanegmond
charactermap Posted October 12, 2009 Author Posted October 12, 2009 Ok, but why type it into AutoIt code which then types it into Notepad? Therefore I thought the artwork was created by another program that doesn't allow copy&paste.in online chat games like poker and bingo you can use the software to display the artwork and wow the playersunfortunately it is not that simple as there are different chat applets and some don't allow spaces so you have to add dots while others only allow one line so you have to make a script that enters each line and the enter command so that the art diaplays fine to everyone
charactermap Posted October 12, 2009 Author Posted October 12, 2009 (edited) AutoIt is a programming language. It's not a macro tool, but you can use AutoIt to create a macro tool. The functions in AutoIt are much more low level, then what you are expecting them to be.I have created a library to do what you asking (except the replace part):http://www.autoitscript.com/forum/index.php?showtopic=68422Thanks for the heads up Manadar! This is a great forum and I cannot recall another forum where I have been made welcome like thischeers to you guys! Edited October 12, 2009 by charactermap
charactermap Posted October 13, 2009 Author Posted October 13, 2009 One more quick questionI can't for the life of me locate the auto text replace function...(is that what it's called?)exampleif I input---birthdayinto notepad so that the text triggers the birthday cake.CheersI have been reading through and searching and I can't find a way for autoit to run the script using a simple text command. I am trying to use a text trigger---birthdayand when that text is written then it will make the birthday cake.there most by a command that can easily do this?say if I am typing a letter and I type in ---myname it replaces that with whatever I have in the autoit script. I am hoping to make one .ahk file with a bunch of seperate art and text that I can trigger each one using a text trigger such as ---birthdayI am completely lost. I cannot locate any idea on the search to use in the help file. The tutorials seem to use the wait the "WinWaitActive("Untitled - Notepad")" or "Run("notepad.exe")" suggesting that users are only clicking the script file to make the script run and execute. I am trying to leave the script running and making it execute by trying the trigger.Can anyone help?Thanks
jvanegmond Posted October 13, 2009 Posted October 13, 2009 1. Use the library I have given you above. 2. Delete the text that was written by sending backspaces. 3. Send your text github.com/jvanegmond
charactermap Posted October 13, 2009 Author Posted October 13, 2009 1. Use the library I have given you above.2. Delete the text that was written by sending backspaces.3. Send your textThanks!I was looking through the link and tried the script you posted herehttp://www.autoitscript.com/forum/index.php?showtopic=68422&view=findpost&p=505155I could not locate the 3 .au3 files#include <WinAPI.au3>#include <WindowsConstants.au3>#include <Array.au3>#include-onceHead hurts lolIt's much to complicated for me to figure out and I guess I should give up trying. Thanks for the tip.Cheers
jvanegmond Posted October 13, 2009 Posted October 13, 2009 These files are included with a standard AutoIt v3 installation.I am hoping to make one .ahk file with a bunch of seperate art and text that I can trigger each one using a text trigger such as ---birthdayAutoIt uses .au3 files... Are you sure you are looking for AutoIt help and not AutoHotkey help? github.com/jvanegmond
Malkey Posted October 13, 2009 Posted October 13, 2009 Copy this text which is from http://www.ascii-art.de/ascii/Paste into NotepadAnd save as "Birthday.txt" in the script's directory/folder.( ( ( ) ( ) ( ( Y Y ( ) ( ) |"| |"| Y Y | | | | |"| |"| | |.-----| |---.___ | | | | .--| |,~~~~~| |~~~,,,,'-| | | |-,,~~'-'___ '-' ~~| |._ .| |~ // ___ '-',,'. /,'-' <_// // _ __ ~,\ / ; ,-, \\_> <<_' ____________;_) | ; {(_)} _, ._>>`'-._ | | ; '-'\_\/> '-._ | |\ ~,,, _\__ ,,,,,'-. | | '-._ ~~,,, ,,,~~ __.-'~ | | | '-.__ ~~~~~~~~~~~~ __.-' |__| |\ `'----------'` _| | '=._ __.=' | : '=.__ __.=' | \ `'==========='` .' snd '-._ __.-' '-.__ __.-' `'-----------'` _ _ |_| /| |_)|_)\_/ | | /-| | | / _ _ ___ _ |_) | |_) | |_|| \ /| \_/ |_) | | \ | | ||_/ /-| /This example script may give you a few ideas.Notice StringReplace ; #include <File.au3> $sBirthday = FileRead("Birthday.txt") ConsoleWrite($sBirthday & @CRLF) ConsoleWrite(StringRegExpReplace(StringFormat("%50s", " "), ".", "=") & @CRLF & @CRLF) $sBirthday = StringReplace($sBirthday, " ", ".") ConsoleWrite($sBirthday & @CRLF) ;ShellExecute("Birthday.txt") ; or ;Run('Notepad.exe "Birthday.txt"'); or Local $aFileArray Run('Notepad.exe') WinWaitActive("Untitled") $sBirthday = _FileReadToArray("Birthday.txt", $aFileArray) For $x = 1 To $aFileArray[0] Send($aFileArray[$x] & "{ENTER}") Next ;I assume you are using SciTE so that you will get full benefit out of the ConsoleWrite commands.
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