Sign in to follow this  
Followers 0
magace

noob question about this array

6 posts in this topic

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:

Global $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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks knew it would be something easy!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0