Jump to content

noob question about this array


 Share

Recommended Posts

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
Link to comment
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 2022-02-19 - Version 1.6.1.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 (NEW 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

 

Link to comment
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!

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...