magace Posted August 10, 2012 Posted August 10, 2012 So i got this thing I made to run with my jobs website and I need to know if its possible to split this array line for line so I can edit easier. Currrently the script is working with it like this: Global $Words[21] = [20, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!","....................................","************************************","~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~","$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$","!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!", "...SPAM SPAM SPAM SPAM SPAM SPAM ..", "************************************", "~~~~~~ADSGH1342GH3R5G132I45U2133~~~~", "$$%%%$$$WAITING$@#$#@$@@#$@#$!#@$$$$","WTF WTF WTF WTF WTF WTF WTF WTF WTF ", "...ASDFASDFADSFASDFADSFADSFADS......", "************************************", "~~~~~~~~~TANKER~~~~~~~~~~~~~~~~~~~~~", "$$$$$OF$$$$$$WTF$$$$$$SON$$$$$$$$$$$$", "!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!", "...SPAM SPAM SPAM SPAM SPAM SPAM ..", "************************************","~~~~~~ADSGAHAHHAHAHAHHAHA45U2133~~~~", "$$%%%$$$WAITING$@#$#@$@@#$@#$!#@$$$$$"] However I would like to be able to have it line for line like this so I can edit it easier: Global $Words[21] = [20, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "....................................", "************************************", "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", "!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!", "...SPAM SPAM SPAM SPAM SPAM SPAM ..", "************************************", "~~~~~~ADSGH1342GH3R5G132I45U2133~~~~", "$$%%%$$$WAITING$@#$#@$@@#$@#$!#@$$$$", "WTF WTF WTF WTF WTF WTF WTF WTF WTF ", "...ASDFASDFADSFASDFADSFADSFADS......", "************************************", "~~~~~~~~~TANKER~~~~~~~~~~~~~~~~~~~~~", "$$$$$OF$$$$$$WTF$$$$$$SON$$$$$$$$$$$$", "!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!", "...SPAM SPAM SPAM SPAM SPAM SPAM ..", "************************************", "~~~~~~ADSGAHAHHAHAHAHHAHA45U2133~~~~", "$$%%%$$$WAITING$@#$#@$@@#$@#$!#@$$$$$" ] Any ideas or a better way to do this? Here is complete code: expandcollapse popupGlobal $Words[21] = [20, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!","....................................","************************************","~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~","$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$","!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!" HotKeySet("{END}", "Terminate") HotKeySet("{HOME}", "LogIn") HotKeySet("{PRINTSCREEN}", "ToggleGo") While 1 $go3 = 1 While $go3 = 1 $coord = PixelSearch(22, 90, 24, 92, 0x4E5869, 10) If Not @error Then $go3 = 1 SLEEP(500) $iIndex = Random(1, 20, 1) ; random integer 1, 2 or 3 tooltip($Words[$iIndex] & "",Random(513,1583),Random(74,147)) Else $go3 = 0 tooltip("",Random(513,1583),Random(74,147)) EndIf WEnd sleep(500) WEnd func ToggleGo() Local $answer = InputBox("Question", "What part number?", "....", "", _ - 1, -1, 0, 0) Local $answer2 = InputBox("Question", "How many should we print?", "....", "", _ - 1, -1, 0, 0) $go3 = 1 While $go3 = 1 $coord = PixelSearch(22, 90, 24, 92, 0x4E5869, 10) If Not @error Then $go3 = 0 tooltip("TIME TO PRINT!!!!",Random(513,1583),Random(74,147)) Else $go3 = 1 tooltip("NOT THERE!!",Random(513,1583),Random(74,147)) EndIf WEnd mousemove(757,292) ;moves to part number drop down mouseclick("Left") ;clicks it send($answer) ;sends first input box sleep(800) send("{ENTER}") sleep(1000) mousemove(1386,287) ;moves to submit box sleep(1000) mouseclick("left") ;clicks it Sleep(1100) While $answer2 > 0 $answer2 = $answer2 - 1 Global $answer3 = $answer2 Print() Sleep(1000) WEnd EndFunc func Print() tooltip($answer3 & ": Left to print!!",Random(513,1583),Random(74,147)) send("{ENTER}") $go = 1 while $go = 1 $coord = PixelSearch(1242, 385, 1244, 387, 0xCCCCCC, 10) If Not @error Then $go = 0 mousemove(1386,287) ;moves to submit box sleep(500) mouseclick("Left") ;clicks it $go2 = 1 While $go2 = 1 $coord = PixelSearch(1108, 425, 1109, 426, 0x6F7D94, 10) If Not @error Then $go2 = 0 Else tooltip("WAITING!!",Random(513,1583),Random(74,147)) EndIf WEnd Else tooltip("WAITING!!",Random(513,1583),Random(74,147)) EndIf WEnd EndFunc Func LogIn() mousemove(521,289) ;moves to login box mouseclick("Left") ;clicks it send("9949") send("{TAB}") send("w") sleep(500) SEnd("teadsfadsfsadfer") send("{ENTER}") mousemove(286,329) ;moves to login box mouseclick("Left") ;clicks it EndFunc Func Terminate() Exit 0 EndFunc
jdelaney Posted August 10, 2012 Posted August 10, 2012 Global $array[21]=[20, _ "Text1", _ "Text2", _ ... "TextLast"] IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
water Posted August 10, 2012 Posted August 10, 2012 WTF are you trying to do with this script? I had a quick look a it and I think you are violating the forum rules quite heavy! 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
magace Posted August 10, 2012 Author Posted August 10, 2012 WTF are you trying to do with this script?I had a quick look a it and I think you are violating the forum rules quite heavy!How am I Violating any rules all its doing is printing out lables for me so I dont have to click every time they have a shitty system and my way is way faster!
Moderators Melba23 Posted August 10, 2012 Moderators Posted August 10, 2012 magace, Use the line continuation operator like this: Global $Words[21] = [20, _ "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", _ "....................................", _ "************************************", _ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", _ "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", _ "!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!", _ "...SPAM SPAM SPAM SPAM SPAM SPAM ..", _ "************************************", _ "~~~~~~ADSGH1342GH3R5G132I45U2133~~~~", _ "$$%%%$$$WAITING$@#$#@$@@#$@#$!#@$$$$", _ "WTF WTF WTF WTF WTF WTF WTF WTF WTF ", _ "...ASDFASDFADSFASDFADSFADSFADS......", _ "************************************", _ "~~~~~~~~~TANKER~~~~~~~~~~~~~~~~~~~~~", _ "$$$$$OF$$$$$$WTF$$$$$$SON$$$$$$$$$$$$", _ "!!!!!!!!!!CALM THE FUCK DOWN!!!!!!!!", _ "...SPAM SPAM SPAM SPAM SPAM SPAM ..", _ "************************************", _ "~~~~~~ADSGAHAHHAHAHAHHAHA45U2133~~~~", _ "$$%%%$$$WAITING$@#$#@$@@#$@#$!#@$$$$$"] 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
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