Sign in to follow this  
Followers 0
Piyush

Need a function for this...

6 posts in this topic

please suggest a function which returns the file name from the location of website

for eg...

if the input is this...

http://www.autoitscript.com/forum/index.php

it should return "index.php"

thanks...


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites



Piyush,

Try this:

$sURL = "http://www.autoitscript.com/forum/index.php"
$sFileName = StringRegExpReplace($sURL, "^.*\/", "")
ConsoleWrite($sFileName & @CRLF)

You can easily reduce it to 1 line. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

thanks to both of you for such a good and quick reply..


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites

one more help please..

i was just building a program that downloades a whole of the webpage...by downloading some of the files related to it such as the javascript source or any css file included in it and also the images with it..

i want to get the path of the files and images by the source. i thought that i get the source of that page by _INetGetSource and download the html file with inetget. but how can i get the paths of the css and images by the source. is there any way so that i can apply the html dom feature on the source.

i can do it by opening the html file with _IECREATE and then access the sources but i don't want to use it as it uses lot of memory.

Please help me with this problem..and also inform me if there is no such way to apply the dom feature on an html source.. so i can start thinking other ways..


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites

find a web spider in the autoit form and change it so instead of writing logs it downloads files.


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

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