BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 eXtreme Movie Manager 8, 9, 10 Forum
 Scripts
 Possible to Pause Script?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jjohnbubbles
Starting Member

Saint Lucia
49 Posts

Posted - 25 Jan 2014 :  21:49:38  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a site I am trying to write a script for. The problem is, when I run a script with more than 10 or so movies, the website locks me out for about half an hour for excessive use.

When I manually click around the site as fast as I can I never get locked out. I'm assuming based on the speed XMM is operating, it knows a bot is mining data and is stopping me.

Is it possible to insert pauses into XMM to slow it down a bit so this site doesn't lock me out?

Thanks!

JDommi
Administrator

Germany
4655 Posts

Posted - 25 Jan 2014 :  22:11:23  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
A pause isn't available in MagicScript.
But you can use something like that:

	#PUT#=10000#98#
	#PUT#=0#99#
:TIMER
	#COMPUTEVAR#=#99#+1
	#IF# #99#<>#98#
		#GOTO#=TIMER
	#ENDIF#

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

jjohnbubbles
Starting Member

Saint Lucia
49 Posts

Posted - 25 Jan 2014 :  23:18:14  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That's almost exactly what I did, even with the same variable numbers!

I wasn't aware of the computervar option but I did the same thing with the cursor :

#PUT#=10000#99#
#PUT#=0#98#
#RESETCURSOR#
#REPEAT#
#COMPUTECURSOR#=+1
#PUTCURSOR#=#98#
#WHILE# #98#<>#99#

This gives me about a 9 second pause.

Thanks for the smarter approach. Ill remember var next time.
Go to Top of Page

JDommi
Administrator

Germany
4655 Posts

Posted - 26 Jan 2014 :  10:09:46  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
#REPEAT# - #WHILE# is the smarter solution as you don't need any #GOTO#-label. But the #PUTCURSOR# could theoretically produce an error in a worst case scenario.
One thing that could make problems, too: every loop takes a different time on each machine depending on the processor and OS. Therefor this loop should have an optional value ranging from 5000 to 15000.

#LOADOPTIONS#
    #SETOPTION#=#97#1[Delay time]0=slow processor|1=normal processor|2=fast processor
#ENDLOADOPTIONS#

//... somewhere in the last executed block or whereever you want

    #IF# #97#==#0#
        #PUT#=5000#98#
    #ENDIF#
    #IF# #97#==#1#
	#PUT#=10000#98#
    #ENDIF#
    #IF# #97#==#2#
	#PUT#=15000#98#
    #ENDIF#

    #PUT#=0#99#
    #REPEAT#
	#COMPUTEVAR#=#99#+1
    #WHILE# #98#<>#99#

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse

Edited by - JDommi on 26 Jan 2014 10:14:22
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.1 sec. Powered By: Snitz Forums 2000 Version 3.4.07