Developers Jos Posted February 27, 2023 Developers Posted February 27, 2023 (edited) @mike1950rPlease stick to one topic! ** Merged ** Edited February 27, 2023 by Jos 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.
Solution mike1950r Posted February 27, 2023 Author Solution Posted February 27, 2023 (edited) Sorry to everybody for my confusion. Infact the methode creating an internet shortcut i used was completely wrong. Nevertheless it worked for most urls. Anyway it must be another procedure like this: Func FileCreateInternetShortcut($sUrl, $sFileName, $sWorkingDir, $sIcon) Local $bSuccess, $iSec, $sIni $bSuccess = False $sWorkingDir = StringRegExpReplace($sWorkingDir, "\\+\z", "") & "\" If FileExists($sWorkingDir) Then $sFileName = StringReplace($sFileName, ".url", "") & ".url" $sIni = $sWorkingDir & $sFileName $iSec = "InternetShortcut" $sUrl = StringRegExpReplace($sUrl, "^.*?:/+", "") IniWrite($sIni, $iSec, "URL", $sURL) IniWrite($sIni, $iSec, "IDList", "") IniWrite($sIni, $iSec, "IconFile", $sIcon) IniWrite($sIni, $iSec, "IconIndex", "") $bSuccess = True EndIf Return $bSuccess EndFunc ;==>FileCreateInternetShortcut This is not created by me, I just modified it for my use. It creates another type of file not the same like FileCreateShortcut does. It accepts all Urls and creates the internet shortcuts like Internet Explorer does. The icon part is for those, who download the icon first from the internet sites, like me. Anyway, I want to thank everybody for assisting me and leaving me stealing their time. Thanks again. Cheers mike ☺️ Edited February 27, 2023 by mike1950r
mike1950r Posted February 27, 2023 Author Posted February 27, 2023 (edited) Have to set: IniWrite($sIni, $iSec, "IconIndex", "0") Cheers mike Edited February 28, 2023 by mike1950r
mike1950r Posted February 27, 2023 Author Posted February 27, 2023 (edited) Working fine now. Edited February 28, 2023 by mike1950r
mike1950r Posted August 2 Author Posted August 2 Hi again, sorry to jump in another time so lately. There keeps one problem. All "https" are written as "http". Cannot find a way to get that working. Thanks for assistance. Cheers mike
argumentum Posted August 2 Posted August 2 Ok, reverse engineering time ! I took a browser link, dragged it to an editor and this is what I saw: [InternetShortcut] URL=https://www.youtube.com/watch?v=5aWWjNwpDDc in a file named "How to get a lot of money and pay my bills.url" Ok, so I guess: IniWrite("How to get a lot of money and pay my bills.url", "InternetShortcut", "URL", "https://www.youtube.com/watch?v=5aWWjNwpDDc") would recreate that link. I didn't read much but am guessing that this is all you need. Unless I got the question wrong. mike1950r 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
mike1950r Posted August 2 Author Posted August 2 35 minutes ago, argumentum said: Ok, reverse engineering time ! I took a browser link, dragged it to an editor and this is what I saw: [InternetShortcut] URL=https://www.youtube.com/watch?v=5aWWjNwpDDc in a file named "How to get a lot of money and pay my bills.url" Ok, so I guess: IniWrite("How to get a lot of money and pay my bills.url", "InternetShortcut", "URL", "https://www.youtube.com/watch?v=5aWWjNwpDDc") would recreate that link. I didn't read much but am guessing that this is all you need. Unless I got the question wrong. thanks argumentum, i found the problem. I should not use: $sUrl = StringRegExpReplace($sUrl, "^.*?:/+", "") before writing the ini file. Cheers mike argumentum 1
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