Jump to content

Recommended Posts

Posted
  On 4/30/2012 at 5:09 PM, 'smartee said:

Ha! your no changed into a maybe, my chances are getting better by the minute ;) and to think I'd have been clueless had trancexx not asked..

It's just a polite way of saying no, rather than being direct.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (edited)

  On 4/30/2012 at 8:48 PM, 'smartee said:

ok, two or more instances should be opened in such a case, and from above I assume the admiral concurs, can you post a short video or something so I can see precisely what you are doing?

Man, i'll really appreciate your help but it's the fourth time i'll say the same thing ;)

Screen:

Posted Image

The result is:

Posted Image

Hope this time is clear. It's normal to have one instance and one path because if open the 2 files on a cmd window i have only one instance and only one path

  On 4/30/2012 at 8:48 PM, 'smartee said:

Anyway, you should be able to put together a script using WM_COPYDATA and optionally, _Singleton, that would pass the file-names to the already running script.

Check guinness's signature (lol everything seems to be in there) for a WM_COPYDATA example.

If you get stuck post back with your attempt, I'll try to put together a simple example.

Please provide an example of use for attempt my goal ( open more file(s) with an autoit .exe for retrive full path of the files ), it's hard to lear a UDF

Edited by johnmcloud
Posted

  Quote

Please provide an example of use for attempt my goal ( open more file(s) with an autoit .exe for retrive full path of the files ), it's hard to lear a UDF

johnmcloud,

There's an example already, look in my signature.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 5/1/2012 at 8:43 AM, 'guinness said:

johnmcloud,

There's an example already, look in my signature.

Yes, i see it but...i don't understand how to use it ;)

Sorry

Posted

Ok, well have you tried it? I would suggest using the help file to break it down, because i've tried to structure it in a way that requires little user knowledge.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

If you use SendTo every item will be each own parameter. See my earlier post.

#include <Array.au3>

_ArrayDisplay($CmdLine)

[0]|2

[1]|C:\Users\Admiral\Documents\GFWLIVESetupLog.txt

[2]|C:\Users\Admiral\Documents\FlashBoot1.log

Or use guinness function.

  On 5/1/2012 at 9:02 AM, 'johnmcloud said:

Yes, i see it but...i don't understand how to use it ;)

Sorry

Run the example?
Posted (edited)

All things considered smartee has tried to help, there is only so much we can do. Lack of understanding or knowledge comes from your willingness to learn.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 5/1/2012 at 9:09 AM, 'AdmiralAlkex said:

If you use SendTo every item will be each own parameter. See my earlier post.

#include <Array.au3>

_ArrayDisplay($CmdLine)

[0]|2

[1]|C:UsersAdmiralDocumentsGFWLIVESetupLog.txt

[2]|C:UsersAdmiralDocumentsFlashBoot1.log

Or use guinness function.

Run the example?

It's not a problem to run the example, but to understand how work the UDF

With "Open with" not work, i can't use "Send to" because i want to associate the extension...

Edited by johnmcloud
Posted (edited)

  On 5/1/2012 at 10:04 AM, 'AdmiralAlkex said:

What is your question then? His function returns an array. You must know that by now. You don't know how to use arrays? Go check the array tutorial.

I know what is an array

I'll repeat again my question, maybe i'm not clear:

"There is a way to open directly a file(s) with an autoit .exe and save the full path of the file(s) on a inputbox/file/whatever? It's easy to open the script and then select the file, or make an array. But i want to open the file(s) directly with context menu -- open with -- myautoit.exe or make a extension association"

Hope now is clear what is my goal. If someone knows how to, please post an example script.

Thanks

Edited by johnmcloud
Posted (edited)

  On 5/1/2012 at 11:17 AM, 'johnmcloud said:

I know what is an array

I'll repeat again my question, maybe i'm not clear:

"There is a way to open directly a file(s) with an autoit .exe and save the full path of the file(s) on a inputbox/file/whatever? It's easy to open the script and then select the file, or make an array. But i want to open the file(s) directly with context menu -- open with -- myautoit.exe or make a extension association"

Hope now is clear what is my goal. If someone knows how to, please post an example script.

Thanks

I think we've understood quite well, you wanted to create a filetype association with your program, smartee provided a solution in post #2, you said I know how to do that. Then you wanted to open your exe when a particular file was selected and paste that data into an input box, smartee again provided you with an answer. I think what you're looking for is someone to create bespoke code for you, is this correct? Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 5/1/2012 at 4:03 PM, 'guinness said:

I think we've understood quite well, you wanted to create a filetype association with your program, smartee provided a solution in post #2, you said I know how to do that. Then you wanted to open your exe when a particular file was selected and paste that data into an input box, smartee again provided you with an answer. I think what you're looking for is someone to create bespoke code for you, is this correct?

No, isn't correct ( and i don't undestand the word bespoke )

The #2 post work fine but only one one file at time, not work with multiselection like FileOpenDialog.

I'm looking for a generic example ( because you can apply this in many scenario, stupid example as delete a file, modify tags, start it with parameters etc..., inputbox is only generic solution ) because for me is more easy try it an experiment different scenario by myself, but i need something working with multiselection and for now i can't find a solution, and smartee is the only one try to help me an post some script...

For me is hard think/write in a different language, for this i'd like example and post a generic request can be useful for other, not only for me. That's a all. If you want to help me with a generic example script, i'll appreciate. If you don't want, thanks anyway.

Posted

Bespoke

So you want to select multiple files via the explorer context menu, select 'Open with my Program' and then for those to be displayed in your program?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

What about

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 5/1/2012 at 5:48 PM, 'guinness said:

Bespoke

So you want to select multiple files via the explorer context menu, select 'Open with my Program' and then for those to be displayed in your program?

Yes, a sort of. I don't need to see the image/text/content of the file, simply the full path of every file. This path can be also write directly on a txt and then the GUI read it, is not a problem the second part of the script, the problem is capture the full path of multiple files with 'Open with my Program'

  On 5/1/2012 at 5:59 PM, 'guinness said:

What about

I have tested it and work but only with a single file, not with multiple files, like the smartee's script

Edited by johnmcloud
Posted

It works for me with multiple files. Try the second solution in post #23.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 5/2/2012 at 7:20 AM, 'guinness said:

It works for me with multiple files. Try the second solution in post #23.

Do you mean this, right?

#include <Misc.au3>
#include <File.au3>
#include <Debug.au3>

$MultiProcFolder = @ScriptDir & "parse"
If Not FileExists($MultiProcFolder) Then DirCreate($MultiProcFolder)
$parsedsource = $CmdLine[$CmdLine[0]]
$parsedsourceX = StringRight($parsedsource, StringLen($parsedsource) - StringInStr($parsedsource, "", 0, -1)) & ".txt"
If Not _Singleton(@ScriptName, 1) Then
FileWrite($MultiProcFolder & $parsedsourceX, $parsedsource)
Exit
EndIf
Do
Sleep(200)
$procnumber = ProcessList(@ScriptName)
Until $procnumber[0][0] < 2
$FinalFileList = $parsedsource & @CRLF
$fileList = _FileListToArray($MultiProcFolder)
If IsArray($fileList) Then
For $x = 1 To $fileList[0]
  $FinalFileList &= FileReadLine($MultiProcFolder & $fileList[$x]) & @CRLF
  FileDelete($MultiProcFolder & $fileList[$x])
Next
EndIf
_DebugSetup()
_DebugOut($FinalFileList)

On my WinXp SP3 i see only one path, v3.3.8.0:

Posted Image

Posted

I compiled my example in post #34, ran the compiled exe, selected a couple of files and right clicked to display the context menu and selected the item "Start <Compiled Exe>" it works!

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 5/2/2012 at 8:14 AM, 'guinness said:

I compiled my example in post #34, ran the compiled exe, selected a couple of files and right clicked to display the context menu and selected the item "Start <Compiled Exe>" it works!

Not for me ;)

Posted Image

Anyway, i don't want to open the software before the files, but the files open the software then the software capture the path :)

Edited by johnmcloud
Posted

Opening of the program is entirely up to you, I have Notepad open just as a visual aid.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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...