Jump to content
UBot Underground

Beginner Needs Help With List


Recommended Posts

Hello,

ive searched Forum but not found any similar. I have a List with Screen Resolution per examle 800x600, 1024x678 an so one. They are in a List in every new Row.

How did i become them in two Variables? Like var1=800 and var2=600 !

Thanks for your Help

Pete

Link to post
Share on other sites

this is some very basic regular expression I am going to show,far from the best way ,var a finds any number at the start 800(reg exp = ^\d+,var b any number at the end(reg exp = \d+$)

 

add item to list(%screen,"800x600","Delete","Global")
set(#var a,$find regular expression(%screen,"^\\d+"),"Global")
set(#var b,$find regular expression(%screen,"\\d+$"),"Global")

Link to post
Share on other sites

or if you don't like that style you can do this...(but, nothing wrong with that style above)

 

set(#next list item,"800x600","Global")
alert($list item($list from text(#next list item,"x"),0))
alert($list item($list from text(#next list item,"x"),1))

 

alert($find regular expression(#next list item,".*?(?=x)"))
alert($find regular expression(#next list item,"(?<=x).*"))

 

CD

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...