Jump to content
Sign in to follow this  
SergeySpandaryan

Script that return web address with next number

Recommended Posts

SergeySpandaryan

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
water

What have you coded so far?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
SergeySpandaryan

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
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
SergeySpandaryan

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
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
SergeySpandaryan

Just watch them without doing unnecessary operations.

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

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


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
SergeySpandaryan

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
SergeySpandaryan

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
SergeySpandaryan

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

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
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  

×