Jump to content

Сonsistently URL generation (in order)


Recommended Posts

Hi guys!

Need community help with link generation via Autoit. 

Issue:

I got link as https://mywebsite.com/123abc. 

I want to change last 3 digits in alphabet order, like  https://mywebsite.com/123aaa ,  https://mywebsite.com/123aab,  https://mywebsite.com/123aac etc.  

Now, I am using txt file, where all variants of links located :( 

 

How can I release this feature? Which functions should I use? 

Thanks!

Link to post
Share on other sites
  • Developers
54 minutes ago, Tim93 said:

How can I release this feature? Which functions should I use? 

Did you try anything before posting or do you want to be spoon-fed? ;) 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
59 minutes ago, Tim93 said:

I want to change last 3 digits in alphabet order, like  https://mywebsite.com/123aaa ,  https://mywebsite.com/123aab,  https://mywebsite.com/123aac etc.  

First you need to assign it to a string. 
Second split the string. StringSplit - AutoIt Wiki (autoitscript.com)
Third. create a counter Keyword For...To...Step...Next (autoitscript.com)
Then you want to assign the counter to ASCIIcode CHR Function Chr (autoitscript.com)

Link to post
Share on other sites
23 minutes ago, Jos said:

Did you try anything before posting or do you want to be spoon-fed? ;) 

Sure, I have done main part of script, but don't have any idea how to work with Alphabet generation :( 

 

Link to post
Share on other sites
11 minutes ago, Tim93 said:

Sure, I have done main part of script, but don't have any idea how to work with Alphabet generation :( 

If you read this page Function Chr (autoitscript.com) and play around with the Example, I'm sure you will find your solution.
 

Here is a Debug Example (Function Chr) of my own that maybe better to understand running it in sciTE to break down what is happening in the console output.

#include <MsgBoxConstants.au3>
$debug = True


Local $sText = ""
For $i = 65 To 90
    $sText = $sText & Chr($i) ; Or $sText &= Chr($i) can be used as well.

    If ($debug) Then
        ConsoleWrite("$i-" & $i & @CRLF)
        ConsoleWrite("$sText-" & $sText & @CRLF)
        ConsoleWrite("Chr($i)-" & Chr($i) & @CRLF)
        ConsoleWrite(@CRLF) ;; break line
    EndIf
Next

MsgBox($MB_SYSTEMMODAL, "Uppercase alphabet", $sText) ; Display the characters between 65 to 90.


 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...