Jump to content

My Include Script Collection # 1


Guest Guidosoft
 Share

Recommended Posts

Func CollectionFind($Array, $Text)
   For $I = 1 to $Array[0]
      If StringLeft($Array[$I], StringLen($Text)) = $Text then
         Return $I
      EndIf
   Next
EndFunc

I don't understand what that does. Should you be using StringInString?

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

Guest Guidosoft

CollectionFind finds an element wich contains the specified text and returns its number.

CollectionFindExact finds and element with exactly the specified contents and returns the number of it's element. 0 is returned if there is none found naturally by the rules of AutoIt returns.

Link to comment
Share on other sites

...example:

$Text = "Text"
MsgBox("","",StringLeft("This is text", StringLen($Text)))

If it CONTAINS it why not use StringInString? That doesn't look like it works...

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

Why do you use the registry to store the "shared variables"? (from AppCommunicate.AU3)

I thought you were using a really clever method.

Other methods that are possible:

- text area of the hidden AutoIt window

- the title of the hidden AutoIt window

- INIRead, INIWrite

- FileRead, FileWrite (not recommended)

BTW Does the registry work faster than using an INI file?

Edited by SlimShady
Link to comment
Share on other sites

Guest Guidosoft

Why do you use the registry to store the "shared variables"? (from AppCommunicate.AU3)

I thought you were using a really clever method.

Other methods that are possible:

- text area of the hidden AutoIt window

- the title of the hidden AutoIt window

- INIRead, INIWrite

- FileRead, FileWrite (not recommended)

BTW Does the registry work faster than using an INI file?

<{POST_SNAPBACK}>

Alright fine. AppCommunicate1.2 shall have INI File variable sharing and command sending. Are you happy? Lol.
Link to comment
Share on other sites

no, im not on sugestyroids.

what does notepad console do, when i run it the program instantly closes :lmao:

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Guest Guidosoft

no, im not on sugestyroids.

what does notepad console do, when i run it the program instantly closes  :lmao:

<{POST_SNAPBACK}>

Open up a text editor. And put the following code in:

#Include "NotepadConsole4.AU3"

LoadConsole("Questions")
$Name = Input("What is your name? ")
$Age = Input("How old are you? ")
ConsoleOutputLine("So, you name is "& $Name &" and you are " & $Age & " years old.")
CloseConsole()

Make sure you have NotepadConsole4.AU3 in the same directory as this script and run this cript. That should pretty much reveal to you what the darn thing is for.

Edited by Guidosoft
Link to comment
Share on other sites

you sooooo got that idea from: http://www.cplusplus.com/doc/tutorial/tut3-2.html

or

http://www.cplusplus.com/doc/tutorial/tut1-4.html

:) maybe you didn't, but thats what it looks like (nothing wrong with it, thats what i based my new Dll off of..) :lmao:

EDIT: its LoadConsole() and CloseConsole() o:)

Edited by layer
FootbaG
Link to comment
Share on other sites

Guest Guidosoft

you sooooo got that idea from: http://www.cplusplus.com/doc/tutorial/tut3-2.html

or

http://www.cplusplus.com/doc/tutorial/tut1-4.html

:) maybe you didn't, but thats what it looks like (nothing wrong with it, thats what i based my new Dll off of..) :lmao:

EDIT: its LoadConsole() and CloseConsole() o:)

<{POST_SNAPBACK}>

It was my original idea to make a notepad based console.

I actually made a new version it is a Gui with a text box so it is better. It is called GuiConsole.AU3 and is floating around the board somewhere. Do a search and you will find it somewhere.

Link to comment
Share on other sites

i was trying to make a console too, i called it BEA because it would have been a combination of Batch, Executable, and AutoIt but then i knew that iw as doing it the wrong way.. then slimshady came out with the _Execute command thingy which is what i will prob. use when i decide to work on it again, but it may be a while because im learning so many other things and im not usuing the computer basically at all... its so boring now.. :lmao: i have a better life

FootbaG
Link to comment
Share on other sites

o ya i made a chat program that never worked that was all text and it ran in notepad like that it was kinda fun

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Guest Guidosoft

for layer:

I have a better life too.  But I still use the computer.

When I get a girlfriend, I will have an even BETTER life... maybe.

J

Pardon for this irrelevancy.

<{POST_SNAPBACK}>

tas oky.

I just added an example for ALL of my include scripts on my site.

So dere ya go.

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...