How can i make my software when it opened by a file extension (ex, File.klk) it do a custom action like start the program but with custom action only when i open the program by a custom file extension???
Announcement
Collapse
No announcement yet.
Please Help
Collapse
X
-
Originally posted by charliechaps View PostI am sorry my friend but your 3 posts are "HELP ME" with no code, no examples, how are people to understand what you are trying to achieve.
Example:
Please give people a break
like when you click on .apz file, the apz file is being opened by (Autoplay media studio) but with the file data (it opens the project don't open the program "ams")
so consider that i made a file extension called .klk , then i changed the way how it starts (when you click on it), it opens my program but (example, file called "File.klk" when i clicked on it two times to open it, it opened my program but the interior data on the file(example, the file contains some random words "lol xd haha") so when i click on the file two times and it opens my program it loads "lol xd haha" on an input object in my program) so how do i do that?
and sorry again
Comment
-
-
Ok I'm not sure what you are after, if you rename a file that is an EXE
Windows cannot know how to open the file, but if you rename a text file, then AMS can read and open such a file
but you still have to let Windows know to open with notepad.So on another computer you have to rename it back to .txt file to view it
I am not sure if this helps you : mytest.apz
-
👍 1
Comment
-
-
Originally posted by charliechaps View PostOk I'm not sure what you are after, if you rename a file that is an EXE
Windows cannot know how to open the file, but if you rename a text file, then AMS can read and open such a file
but you still have to let Windows know to open with notepad.So on another computer you have to rename it back to .txt file to view it
I am not sure if this helps you : [ATTACH]n302213[/ATTACH]
(notice: this script means nuthin but will make u get the idea also happy new year)
Code:if Application opened by file extension (.klk) then get the text of the file and put it in an input
Comment
-
-
Yes Happy 2019
I showed you how to read text from a file (must be a text file) into object but
if Application opened by file extension (.klk)
Do you mean something like this
Code:-- tbSearchFiles = {"*.doc", "*.ppt", "*.odt", "*.exe"}; set your own file types here -- this one search all types tbSearchFiles = {"*.*"}; for index,type in pairs(tbSearchFiles) do file = File.Find(folder, type, false, false, nil); if file ~= nil and file ~="CANCEL" then --do the following for each file: for j,file_path in pairs(file) do --add the item to the listbox, with the name visible and path as data tbFilePath = String.SplitPath(file_path); sFile = tbFilePath.Extension;--Gets only File extensions from table [COLOR=#FF0000] if sFile == ".klk" then--This is the extension we want[/COLOR] Do something here end end end end
-
👍 1
Comment
-
-
Originally posted by charliechaps View PostYes Happy 2019
I showed you how to read text from a file (must be a text file) into object but
I am still unsure what you mean - double clicking on a file with extension .klk means nothing to windows
Do you mean something like this
Code:-- tbSearchFiles = {"*.doc", "*.ppt", "*.odt", "*.exe"}; set your own file types here -- this one search all types tbSearchFiles = {"*.*"}; for index,type in pairs(tbSearchFiles) do file = File.Find(folder, type, false, false, nil); if file ~= nil and file ~="CANCEL" then --do the following for each file: for j,file_path in pairs(file) do --add the item to the listbox, with the name visible and path as data tbFilePath = String.SplitPath(file_path); sFile = tbFilePath.Extension;--Gets only File extensions from table [COLOR=#FF0000] if sFile == ".klk" then--This is the extension we want[/COLOR] Do something here end end end end
Comment
-
-
but i am sorry just one more question
So u got the image here, when i open the unknown extension (.lpl) it opens the program, but i need when it opens the program it reads the data inside the file that got unknown extension (ex. file.lpl), so i need it opens then reads the data inside the file and put it on an input (or scintilla plugin), for now it opens the program only
Comment
-
-
-
You need to modify the registry for that and add an entry for your file extension. Generally, this is not advised to be doing from your application - however you should do that from the installer of your application. Aside from that, look at the HKEY_CLASSES_ROOT in your registry (regedit) and see how other software does it.
Comment
-
-
Originally posted by Imagine Programming View Posthttps://www.indigorose.com/webhelp/a...sociations.htm
You need to modify the registry for that and add an entry for your file extension. Generally, this is not advised to be doing from your application - however you should do that from the installer of your application. Aside from that, look at the HKEY_CLASSES_ROOT in your registry (regedit) and see how other software does it.
btw i miss u dude i am itz magdy if u remember
Comment
-
-
Originally posted by Tanner View Post
Alright how do i code the registery to read the file data then write it into an input (or scintilla plugin)
btw i miss u dude i am itz magdy if u remember
Comment
-
-
Hello again my friend,
After searching the forums I found what you were talking about
Is this what U R after, sorry exceeds the 8.5Mb by 34k
Link: https://*******/#!PHY0FC5a!cG7xFrhYv...kamwM6Zw6aCIbc
Comment
-
Comment