Piyush Posted October 27, 2009 Share Posted October 27, 2009 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] Link to comment Share on other sites More sharing options...
picaxe Posted October 27, 2009 Share Posted October 27, 2009 $sShortCut = "http://www.autoitscript.com/forum/index.php" $aRet = StringSplit($sShortCut, "/") ConsoleWrite("Using StringSplit = " & $aRet[$aRet[0]] & @LF) ConsoleWrite("Using StringRegExpReplace = " & StringRegExpReplace($sShortCut, '(http://)*(.+/)+', '') & @LF) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 27, 2009 Moderators Share Posted October 27, 2009 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Piyush Posted October 27, 2009 Author Share Posted October 27, 2009 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] Link to comment Share on other sites More sharing options...
Piyush Posted October 27, 2009 Author Share Posted October 27, 2009 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] Link to comment Share on other sites More sharing options...
corgano Posted October 27, 2009 Share Posted October 27, 2009 find a web spider in the autoit form and change it so instead of writing logs it downloads files. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now