weekday

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.

weekday

by digi2 on Sat Oct 29, 2016 2:32 am

hello,

i have a script, this running daily in the night..
i want specific downloads on specific weekdays.

i not found info for "weekday variable" in the wiki.
this gives not ?

thanks for info !
digi2
 
Posts: 3
Joined: Sat Oct 29, 2016 2:28 am

Re: weekday

by iimfun on Mon Oct 31, 2016 12:25 am

Hello,

Do you expect something as follows?
Code: Select all
SET dayLikeToday EVAL("(new Date).getDay();")

Or maybe this?
Code: Select all
SET dayLikeToday EVAL("(new Date).toString().substr(0, 3);")
iimfun
 
Posts: 239
Joined: Tue Jul 19, 2016 6:06 am

Re: weekday

by digi2 on Mon Oct 31, 2016 8:16 am

thank you !

then i like this:
Code: Select all
SET dayLikeToday EVAL("(new Date).getDay();")
'Variable anzeigen
PROMPT {{dayLikeToday}}

'Monday
if ( {{dayLikeToday}} == 1 )
{
URL GOTO="{{URL}}/TEST_{{!NOW:yyyymmdd}}.pdf"
}


-> IF, line xx (Error code: -910)
in the wiki i see that i must eval for if statements.
can that only open url (URL GOTO) when "( {{dayLikeToday}} == 1 )" ?
digi2
 
Posts: 3
Joined: Sat Oct 29, 2016 2:28 am

Re: weekday

by iimfun on Tue Nov 01, 2016 12:43 am

You may also like the following code
Code: Select all
SET dayLikeToday EVAL("(new Date).getDay();")
SET dailyUrl "{{URL}}/TEST_{{!NOW:yyyymmdd}}.pdf"

SET dailyUrl EVAL("u = 'javascript: void(0);'; if ({{dayLikeToday}} == 1) u = '{{dailyUrl}}'; u;")
URL GOTO={{dailyUrl}}
iimfun
 
Posts: 239
Joined: Tue Jul 19, 2016 6:06 am

Re: weekday

by digi2 on Thu Nov 03, 2016 9:12 am

thank you
digi2
 
Posts: 3
Joined: Sat Oct 29, 2016 2:28 am


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 5 guests

-->