To correct the error in script condition

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

To correct the error in script condition

by Kristal on Thu Aug 03, 2017 4:28 am

I have a ready script for IMacros which now, in principle, works, but not quite properly. This script executes tasks in the VKMIX service. Follows to the pages automatically in the instagram. Here it is:
Code: Select all
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
TAB T=1
URL GOTO=http://vkmix.com/tasks?social_type=1&section=Followrs
WAIT SECONDS=3
TAG POS=1 TYPE=I ATTR=TXT:
WAIT SECONDS=2
TAB T=2
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow
WAIT SECONDS=4
TAB T=2
TAB CLOSE
WAIT SECONDS=2
TAB T=1

As you can see, works on the principle,
1. selectable subscription task
2. We are waiting
3. go to the tab with the page where you want Follow
4. We are waiting
5. Click on the desired button
6. We are waiting
7. close the tab with the page to which you had Follow
8. We are waiting
And the script starts anew and so in a circle.
But all the salt is what often happens, or more precisely, almost half of such cases, that despite the fact that I have several tens of accounts, but still I have been signed on these pages from assignments. And if I signed something there already the button is "Following", not "Follow". In order Follow, and that points would be credited, you must first Unfollow, and then re-Follow. You'd think, and the hell with these buildings for which you have already signed, you think, let them be less? But no, that's not right. If the script can not perform, then it crashes with a crash and the work stops completely.
Therefore, it is necessary to make a small condition that would determine whether I signed, or not, and then I already took one of the action scenarios, either Follow, or to Unfollow and a Follow.
In BASIC it would be very simple, I would write it like this:
Code: Select all
Dim x As String 'Let's say it's a button variable that should be either "Follow" or "Following"
If x = "To subscribtions" Then
'And then execute the script on the way it is now
Else
'And here it's the same, but first the unsubscription, and then again the subscription.

Something like this. But, unfortunately, this is not BASIC.
Maybe so. But there is the syntax error in the variable.
Code: Select all
What are your options for solving this task?
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
TAB T=1
URL GOTO=http://vkmix.com/tasks?social_type=1&section=Followrs
WAIT SECONDS=3
TAG POS=1 TYPE=I ATTR=TXT:
WAIT SECONDS=2
TAB T=2
SET !TIMEOUT_STEP 1
x=ATTR=TXT:Follow
if(x==ATTR=TXT:Follow){
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow}
else {
TAG POS=1 TYPE=BUTTON ATTR=TXT:Following
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow}
WAIT SECONDS=4
TAB T=2
TAB CLOSE
WAIT SECONDS=2
TAB T=1
Last edited by Kristal on Fri Aug 04, 2017 1:17 am, edited 1 time in total.
Kristal
 
Posts: 4
Joined: Thu Aug 03, 2017 3:45 am

Re: To edit script

by chivracq on Thu Aug 03, 2017 5:19 pm

Kristal wrote:I have a ready script for IMacros which now, in principle, works, but not quite properly. This script executes tasks in the VKMIX service. Follows to the pages automatically in the instagram. Here it is:
Code: Select all
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
TAB T=1
URL GOTO=http://vkmix.com/tasks?social_type=1&section=Followrs
WAIT SECONDS=3
TAG POS=1 TYPE=I ATTR=TXT:
WAIT SECONDS=2
TAB T=2
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow
WAIT SECONDS=4
TAB T=2
TAB CLOSE
WAIT SECONDS=2
TAB T=1

As you can see, works on the principle,
1. selectable subscription task
2. We are waiting
3. go to the tab with the page where you want Follow
4. We are waiting
5. Click on the desired button
6. We are waiting
7. close the tab with the page to which you had Follow
8. We are waiting
And the script starts anew and so in a circle.
But all the salt is what often happens, or more precisely, almost half of such cases, that despite the fact that I have several tens of accounts, but still I have been signed on these pages from assignments. And if I signed something there already the button is "Following", not "Follow". In order Follow, and that points would be credited, you must first Unfollow, and then re-Follow. You'd think, and the hell with these buildings for which you have already signed, you think, let them be less? But no, that's not right. If the script can not perform, then it crashes with a crash and the work stops completely.
Therefore, it is necessary to make a small condition that would determine whether I signed, or not, and then I already took one of the action scenarios, either Follow, or to Unfollow and a Follow.

In BASIC it would be very simple, I would write it like this:
Code: Select all
Dim x As String 'Let's say it's a button variable that should be either "Follow" or "Following"
If x = "To subscribtions" Then
'And then execute the script on the way it is now
Else
'And here it's the same, but first the unsubscription, and then again the subscription.

Something like this. But, unfortunately, this is not BASIC.
Maybe so. But there is the syntax error in the variable.

What are your options for solving this task?
Code: Select all
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
TAB T=1
URL GOTO=http://vkmix.com/tasks?social_type=1&section=Followrs
WAIT SECONDS=3
TAG POS=1 TYPE=I ATTR=TXT:
WAIT SECONDS=2
TAB T=2
SET !TIMEOUT_STEP 1
x=ATTR=TXT:Follow
if(x==ATTR=TXT:Follow){
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow}
else {
TAG POS=1 TYPE=BUTTON ATTR=TXT:Following
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow}
WAIT SECONDS=4
TAB T=2
TAB CLOSE
WAIT SECONDS=2
TAB T=1

Euuuuuuh..., before I go reading your Post, is your Thread Title correct and descriptive about the Content...? (= "To edit script")
=> What I understand from your Thread Title is that you want your Script to "edit" itself (= automorph), I think I'm very probably the only one doing that (in pure '.iim'), it is a very "Advanced" Technique (and I've until now only "vaguely" posted about it), some form of AI actually, hum I see some VB Script, yep indeed you can generate an '.iim' Script from VB, that's another Technique indeed... :!:

But this is a Technical Forum, so let's start by the beginning, especially if you have such great Ideas...:
=> (F)CIM...! :mrgreen:
All I see is a "v8.9.6 for FF" Version (is maybe 3 years old), Scripting Interface Version is missing + all the rest... :roll:

But the VB Script you post looks like a simple IF/ELSE, and not like it is (re)generating some '.iim' Script on the fly to me... :cry:
=> Give a Descriptive Title to your Thread about its real Content for me to have a look... :roll:

Oh yeah...!, and I see some '!ERRORCONTINUE' in your Script, ah-ah...! :shock: , deprecated many years ago, meaning you must have been using iMacros for at least 8 years now I guess, you should be answering all Threads on the Forum with your Experience, we could use your Help, ah-ah...! :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: To edit script

by Kristal on Fri Aug 04, 2017 1:17 am

chivracq wrote:
Kristal wrote:I have a ready script for IMacros which now, in principle, works, but not quite properly. This script executes tasks in the VKMIX service. Follows to the pages automatically in the instagram. Here it is:
Code: Select all
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
TAB T=1
URL GOTO=http://vkmix.com/tasks?social_type=1&section=Followrs
WAIT SECONDS=3
TAG POS=1 TYPE=I ATTR=TXT:
WAIT SECONDS=2
TAB T=2
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow
WAIT SECONDS=4
TAB T=2
TAB CLOSE
WAIT SECONDS=2
TAB T=1

As you can see, works on the principle,
1. selectable subscription task
2. We are waiting
3. go to the tab with the page where you want Follow
4. We are waiting
5. Click on the desired button
6. We are waiting
7. close the tab with the page to which you had Follow
8. We are waiting
And the script starts anew and so in a circle.
But all the salt is what often happens, or more precisely, almost half of such cases, that despite the fact that I have several tens of accounts, but still I have been signed on these pages from assignments. And if I signed something there already the button is "Following", not "Follow". In order Follow, and that points would be credited, you must first Unfollow, and then re-Follow. You'd think, and the hell with these buildings for which you have already signed, you think, let them be less? But no, that's not right. If the script can not perform, then it crashes with a crash and the work stops completely.
Therefore, it is necessary to make a small condition that would determine whether I signed, or not, and then I already took one of the action scenarios, either Follow, or to Unfollow and a Follow.

In BASIC it would be very simple, I would write it like this:
Code: Select all
Dim x As String 'Let's say it's a button variable that should be either "Follow" or "Following"
If x = "To subscribtions" Then
'And then execute the script on the way it is now
Else
'And here it's the same, but first the unsubscription, and then again the subscription.

Something like this. But, unfortunately, this is not BASIC.
Maybe so. But there is the syntax error in the variable.

What are your options for solving this task?
Code: Select all
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
TAB T=1
URL GOTO=http://vkmix.com/tasks?social_type=1&section=Followrs
WAIT SECONDS=3
TAG POS=1 TYPE=I ATTR=TXT:
WAIT SECONDS=2
TAB T=2
SET !TIMEOUT_STEP 1
x=ATTR=TXT:Follow
if(x==ATTR=TXT:Follow){
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow}
else {
TAG POS=1 TYPE=BUTTON ATTR=TXT:Following
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow}
WAIT SECONDS=4
TAB T=2
TAB CLOSE
WAIT SECONDS=2
TAB T=1

Euuuuuuh..., before I go reading your Post, is your Thread Title correct and descriptive about the Content...? (= "To edit script")
=> What I understand from your Thread Title is that you want your Script to "edit" itself (= automorph), I think I'm very probably the only one doing that (in pure '.iim'), it is a very "Advanced" Technique (and I've until now only "vaguely" posted about it), some form of AI actually, hum I see some VB Script, yep indeed you can generate an '.iim' Script from VB, that's another Technique indeed... :!:

But this is a Technical Forum, so let's start by the beginning, especially if you have such great Ideas...:
=> (F)CIM...! :mrgreen:
All I see is a "v8.9.6 for FF" Version (is maybe 3 years old), Scripting Interface Version is missing + all the rest... :roll:

But the VB Script you post looks like a simple IF/ELSE, and not like it is (re)generating some '.iim' Script on the fly to me... :cry:
=> Give a Descriptive Title to your Thread about its real Content for me to have a look... :roll:

Oh yeah...!, and I see some '!ERRORCONTINUE' in your Script, ah-ah...! :shock: , deprecated many years ago, meaning you must have been using iMacros for at least 8 years now I guess, you should be answering all Threads on the Forum with your Experience, we could use your Help, ah-ah...! :idea:

I did
Kristal
 
Posts: 4
Joined: Thu Aug 03, 2017 3:45 am

Re: To correct the error in script condition

by chivracq on Fri Aug 04, 2017 2:35 am

Kristal wrote:I did

" I did", hum OK, Thread Title modified, OK, it's not about Automorphing, hum, pity, that would have been interesting..., I read 3 times the Thread Title, I'm still not sure what this Thread is about..., OK, I can better read it, ah-ah...! :oops:

But, grrr...!, I don't come further than v8.9.6 for FF in your Script, I scan your 2 Posts (oh yeah, and you don't need to quote yourself from your first Post again, it doesn't help to read the Thread, I do quote systematically because some Users tend to completely delete their Posts once they've got their Answer, or to constantly edit their Posts as they "progress", which renders such Threads useless for other Users searching the Forum with a similar Case/Qt), but no, sorry, FCI still missing, I don't read...!
Is is so complicated to mention 3 Versions...? Hum + the Version of the Scripting Interface you are using with your VBS Script...? :roll:
Read my Sig or the Forum Rules for Required Info to include when you open a Thread... :idea:

But hum, I saw that your Thread is about Instagram, OK..., "Conditional Follow on Instagram" would be a correct Thread Title, I would have never guessed from "To edit script", ah-ah...!, and "To correct the error in script condition" is not really much-much better, the only useful Term is "Condition"...
But sorry, I usually don't help Users for Like/Follow/Post/Comment on Social Media/Forums (+ Spam/Games/Votes/Captcha/DDos/Hacking)...
I will still read your Post if you mention your FCI (don't worry, I won't ask a 3rd time, ah-ah...!), but I don't help for "Follow on FB/Twitter/Instagram/etc" normally...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: To correct the error in script condition

by Kristal on Fri Aug 04, 2017 9:24 am

chivracq wrote:
Kristal wrote:I did

" I did", hum OK, Thread Title modified, OK, it's not about Automorphing, hum, pity, that would have been interesting..., I read 3 times the Thread Title, I'm still not sure what this Thread is about..., OK, I can better read it, ah-ah...! :oops:

But, grrr...!, I don't come further than v8.9.6 for FF in your Script, I scan your 2 Posts (oh yeah, and you don't need to quote yourself from your first Post again, it doesn't help to read the Thread, I do quote systematically because some Users tend to completely delete their Posts once they've got their Answer, or to constantly edit their Posts as they "progress", which renders such Threads useless for other Users searching the Forum with a similar Case/Qt), but no, sorry, FCI still missing, I don't read...!
Is is so complicated to mention 3 Versions...? Hum + the Version of the Scripting Interface you are using with your VBS Script...? :roll:
Read my Sig or the Forum Rules for Required Info to include when you open a Thread... :idea:

But hum, I saw that your Thread is about Instagram, OK..., "Conditional Follow on Instagram" would be a correct Thread Title, I would have never guessed from "To edit script", ah-ah...!, and "To correct the error in script condition" is not really much-much better, the only useful Term is "Condition"...
But sorry, I usually don't help Users for Like/Follow/Post/Comment on Social Media/Forums (+ Spam/Games/Votes/Captcha/DDos/Hacking)...
I will still read your Post if you mention your FCI (don't worry, I won't ask a 3rd time, ah-ah...!), but I don't help for "Follow on FB/Twitter/Instagram/etc" normally...

Dude, understand. I am hacker, I wrote own script and I realy need help, because my script has bugs.
Kristal
 
Posts: 4
Joined: Thu Aug 03, 2017 3:45 am

Re: To correct the error in script condition

by chivracq on Fri Aug 04, 2017 7:53 pm

Kristal wrote:Dude, understand. I am hacker, I wrote own script and I realy need help, because my script has bugs.

Well good luck Hacker...! :roll:
(Not sure what you expect to "hack" if you don't understand how a Technical Forum works and can't answer a simple Qt (after asking 3 times btw...) when sbd asks you to mention 3 Versions about your Environment, sounds like a Joke, sorry...!)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: To correct the error in script condition

by Kristal on Mon Aug 21, 2017 1:15 pm

chivracq wrote:
Kristal wrote:Dude, understand. I am hacker, I wrote own script and I realy need help, because my script has bugs.

Well good luck Hacker...! :roll:
(Not sure what you expect to "hack" if you don't understand how a Technical Forum works and can't answer a simple Qt (after asking 3 times btw...) when sbd asks you to mention 3 Versions about your Environment, sounds like a Joke, sorry...!)

Help me for my problem
Kristal
 
Posts: 4
Joined: Thu Aug 03, 2017 3:45 am


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 6 guests

-->