Jump to content

passing args from one func to another ?


Recommended Posts

'

Don't know about you Jos, but I live in a democracy.

I am allowed to express my opinion and if you are offended by that, then

I suggest you put me in your ignore list.

And who is insulting who here ? crap, bullshit ?

I'm starting to believe you really are a kid, o wait now I offend you again don't I,

cause I express an opinion.

Well that's too bad cause I am European,

unlike you we'll tell you exactly how we feel.

Without having to fill our sentences with insulting words.

But then again we don't bleep them away either.

I offer my apologies and distinct knowledge in an attempt to start over with a clean sheet and you answer it with hatred ?!

Well if that's how you want to play it.

How far does your influence stretch outside the au3 fora ?

I'll treat you with the same kindness if you ever visit dostips,

which I happen to moderate.

Consider this conversation over Joske.

O and if you do visit, print it in your head how in my OPINION

a professional forum does look like !

But then ofcourse that's just an opinion and unlike you,

I allow you to feel different about it.

See ?, that's how you write a letter without using profanity,

but it still arrives, doesn't it. :oops:

Who on earth do you think you are, mass spammer ?

I suggest you meditate on that, It may help you to relax.

ps: I never insulted the forum nor you nor anyone else, as I said before I gave my opinion but ego seems to overpower the ability to accept criticism objectively.

And now I need to meditate because I don't want to feel unbalanced because of your immaturity.

Edited by EdDyreen

• Any number images • Images of any size • Any number of URLs • Any number of lines

Link to comment
Share on other sites

This regular expression from a post by Ascend4nt might save you some grief:

#include <Array.au3>
$str = '"Hello, World", 12345, "A man, a plan, a canal, Panama!", "XYZZY"'
$array=StringRegExp($str,'((?<=s"|^")[^"]+(?=")|[^s",]+)',3)
_ArrayDisplay($array)
Link to comment
Share on other sites

  • Moderators

EdDyreen,

Strip the double quotes and then split the string on ", " - that gives me the result you want: :bye:

#include <Array.au3>

$str = '0_h, "1_h", "2_h", 3_h, "4_h", 5_h, "6,h", 7, "", 8'

$array=StringSplit(StringReplace($str, '"', ''), ", ", 3)

_ArrayDisplay($array)

Any use? :oops:

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

  • Moderators

EdDyreen,

I thought that was too easy! :doh:

Thinking laterally, why do you use commas for both the intra-variable and the inter-variable delimiters? In some of my UDFs I have used semi-colons as the intra-variable delimiters - like this: :bye:

"a; single; arg", another_arg

Then you can StringSplit the complete string on " , " and then subsequently on " ; " to break up the individual parameters. I found it worked very well. :oops:

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

  • Moderators

EdDyreen,

But there will still be the same sort of parsing going on, it is just that MSDOS does it for you behind the scenes. :doh:

What about my "lateral thinking"? :bye:

M23

Edit: Forget it - I see Jos has produced a SRE to do the job. :oops:

Edited by Melba23

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

  • Developers

Is this what you are looking for?:

#include <Array.au3>
$str = '0_h, "1_h", "2_h", 3_h, "4_h", 5_h, "6,h", 7, "", 8'
$array=StringRegExp($str,'((?<=s"|^")[^"]*(?=")|[^s",]+)',3)
_ArrayDisplay($array)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I've been trying for hours

You didn't bother to run Ascend4nts one-liner in the previous post?

Edit:

Ah, I see, it drops empty parms.

Was still a good place from which to start.

Jos changed one characted to allow empty parms and whala!

(Although the parms have to be quoted. Probably another minor tweak would allow ,, for a blank parm, if that's required)

Edited by Spiff59
Link to comment
Share on other sites

  • Developers

Almost, except that now the last variable , 8 is not detected and is missing, but thanks anyways.

When I run it I get an array with 10 slots and the last one contains the 8.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Probably a hint that you should visit us more frequently!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Moderators

EdDyreen,

Really, I also lost the ability to replace in buffers, is now replace in selection.

I already regret having updated, this is totally unacceptable,

I require replace in buffers, in scite, any solutions besides downgrading ??

Please do not blame us - Jos just tweaks their latest version to work better with AutoIt. You should address your complaints to the SciTE developers. :oops:

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

I don't get what you're complaining about. Care to elaborate?

post-44800-0-92132000-1331636528_thumb.p

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Moderators

jchd,

It never even occurred to me to look - and I am always telling young pilots "Don't assume, check!" :oops:

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

  • Developers

'

Really, I also lost the ability to replace in buffers, is now replace in selection.

I already regret having updated, this is totally unacceptable, :oops:

I require replace in buffers, in scite, any solutions besides downgrading ??

Is it Really needed to reply the way you do?

I am under the impression we are trying to help you and don't see why this is needed.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

EdDyreen,

Do not treat me like a child please

Then do not treat us as idiots. :oops:

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

  • Developers

:oops: Only a pity that this forum looks like a toy store.

That's us, all amateurs and clearly not at the professional level you are at.

*Note to self : Don't bother any further.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

I think that should be the first thing users see when signing up, Danwilli :oops:

Notice: If you are asking for free help, don't be a jerk.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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