Sign in to follow this  
Followers 0
SergeySpandaryan

Script that return web address with next number

13 posts in this topic

#1 ·  Posted (edited)

I want to make script that can return web address with next number

For example this smotri.com/live/182690864-vk/ to this smotri.com/live/182690865-vk/

Can you help me?

Edited by SergeySpandaryan

Share this post


Link to post
Share on other sites



What have you coded so far?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I think I can get off web address from Google Chrome but I don't understand how to add plus 1 to number and then this number to web address.

Share this post


Link to post
Share on other sites

Use StringSplit to split the URL at the slash. Then use StringSplit again on the part "182690864-vk" and split on the minus. Then take the number, increment it by one and create the new URL.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Can you give me example how to split on simplier address?

For example how to do

http://vimeo.com/57264488 to http://vimeo.com/57264489
Edited by SergeySpandaryan

Share this post


Link to post
Share on other sites

Before I post some code here, can you please tell us why you need this addresses? What do you want to do with the URLs?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Just watch them without doing unnecessary operations.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Should be something like this:

Global $sStartURL = "http://vimeo.com/57264488"
Global $aTemp = StringSplit($sStartURL, "/")
If Not @error Then
    $sEndUrl = "http://vimeo.com/" & $aTemp[4] + 1
    ConsoleWrite($sEndUrl & @LF)
EndIf

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I really hate this f*****g editor! :mad2:


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Thank you very much, water

Well, I did this monster. F6 didn't work for some reason

Opt('WinTitleMatchMode', 2)
$hCurrentWindow=WinActive("[ACTIVE]","")
$sTitle = 'Google Chrome'
If WinExists($sTitle) Then
If Not WinActive($sTitle) Then WinActivate($sTitle)
EndIf
Sleep (40)

;Send("{F6}")
MouseClick("left", 867, 38, 1, 0)


Sleep(20)
Send("^{INSERT}")
Sleep(20)

$sStartURL = ClipGet()


Global $aTemp = StringSplit($sStartURL, "/")
If Not @error Then
$sEndUrl = "http://vimeo.com/" & $aTemp[4] + 1
ClipPut($sEndUrl)
Send("+{INSERT}")
EndIf
Edited by SergeySpandaryan

Share this post


Link to post
Share on other sites

I really hate this f*****g editor! :mad2:

lol, I just understood what you mean

Share this post


Link to post
Share on other sites

Is there a way to get Chrome's web address less horribly?

Share this post


Link to post
Share on other sites

Don't know. Never worked with Chrome.

Best bet is to search the forum for "Chrome" limited to search in titles to reduce the number of hits.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0