Jump to content
UBot Underground

Using Variables in Elements breaks Code


Recommended Posts

Hi Guys,

 

I just noticed an annoying bug. Happens in V5 and V4 as well.

Just wanted to check in with you guys to see if others face the same issue?

 

When you use something like:

 alert($scrape attribute(<href=w"{#searchpattern}">"href"))

 

You can add that in Code view. Switch to node view and everythig works perfectly well.

 

But as soon as you switch from Node view to Code view again, the ubot code get's changed to:

 alert($scrape attribute(<href=w#searchpattern>"href"))

 

So {} get's removed.

 

Never experienced that issue before. 

 

Does someone know a workaround for this problem?

 

Thanks

Dan

 

Tracker:

http://tracker.ubotstudio.com/issues/524

 

 

Link to post
Share on other sites

"$element from text" was added just for that reason.

Cool. Yes, that working fine. 

 

But isn't it a bit strange that we need another command? instead of just supporting variables in the elements field directly? 

 

Dan

Link to post
Share on other sites

I've actually requested a solution for that a while ago since before there was no way to achieve that, so it doesn't bother me until it works; but yeah, I agree, it would be more user friendly that way.

Link to post
Share on other sites

Strange thing is,

 

if you do something like:

alert($scrape attribute(<href=w"X{#searchpattern}">"href"))

 

it works. 

Only if {variable} is directly between "" then it doesn't work.

 

Dan

Link to post
Share on other sites

I use this for REGEX/

 

maybe it will work for you too.

 

alert($curlies for RECEX(5))
define $curlies for RECEX(#input) {
    set(#F_left_curly, "\{", "Global")
    set(#F_right_curly, "\}", "Global")
    return("{#F_left_curly}{#input}{#F_right_curly}")
}

Link to post
Share on other sites

Yup I have had that problem, I was building a very large bot and switched to code view and

then back again and it messed the whole bot up. Unfortunately I saved in the proses and lost

a lot of work + some.

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