WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: JTaylor on November 10, 2021, 06:49:11 PM

Title: Feature Request
Post by: JTaylor on November 10, 2021, 06:49:11 PM
I sometimes do work where the person wants to utilize html/css/js,etc. but doesn't want the files on the local drive.  This becomes a hot topic every 2-3 months it seems.    My request is to have an option similar to ExtractAttachedFile() but it writes to the ClipBoard instead of to a file.    I've actually had times where this would be helpful in other stuff I do as well.  Thanks.

Jim
Title: Re: Feature Request
Post by: kdmoyers on November 11, 2021, 04:55:05 AM
I was thinking to myself that if I needed to do this, I would extract the file to a temp folder, clipboard it, then delete the file.  But then I realized, I don't know how I would "write a file to the clipboard" anyway, so... I have no solution!
How does a person write a file to the clipboard?  What does that actually mean, under the hood?
Title: Re: Feature Request
Post by: td on November 11, 2021, 07:41:15 AM
Interesting. Can't say that anyone has mentioned this one before. Of course, this can be done from a compiled script but apparently, there is some reason for not wanting to do it that way.
Title: Re: Feature Request
Post by: stanl on November 11, 2021, 12:49:54 PM
Quote from: kdmoyers on November 11, 2021, 04:55:05 AM
I was thinking to myself that if I needed to do this, I would extract the file to a temp folder, clipboard it, then delete the file.  But then I realized, I don't know how I would "write a file to the clipboard" anyway, so... I have no solution!
How does a person write a file to the clipboard?  What does that actually mean, under the hood?


Jim didn't mention if a temp file could be created first, but if so it is possible... but then the script abandons it, or waits around to see what the op wants to do with it... But I cannot speak from experience as I have always used ADO Streams for that stuff.




Title: Re: Feature Request
Post by: JTaylor on November 11, 2021, 03:55:42 PM
Meant to change ClipBoard to a variable but forgot.  My apologies.   The person doesn't want it on the drive at all as he is afraid someone will see his code.

Something like:

    my_page = ExtractAttachedFileToString("my_file_name")

It can already be done?  The script would be compiled.   What did I miss?

Jim
Title: Re: Feature Request
Post by: td on November 12, 2021, 07:05:23 AM
Don't know anything about the contents of the file - text-based or binary -  or other relevant details but couldn't you create a simple script that reads the file makes the contents into a multiline string and edits the file contents into the compiler source script? You could then have this automagic file start the compile to finish the task. That is how I would do it anyway.
Title: Re: Feature Request
Post by: JTaylor on November 12, 2021, 07:42:47 AM
Yes.   That was at the top of my list of solutions if the feature request didn't pan out :)    I sometimes have extensive SQL scripts that would be nice to handle in this way.    Just thought it would save the client extra steps.   Also curious if anyone else ever thought such a feature would be handy. 

Jim
Title: Re: Feature Request
Post by: td on November 12, 2021, 09:53:31 AM
It will be added to the ever-expanding list of user enhancement requests.
Title: Re: Feature Request
Post by: JTaylor on November 12, 2021, 11:53:59 AM
Thanks.

Jim
Title: Re: Feature Request
Post by: ....IFICantBYTE on November 12, 2021, 01:47:58 PM
I wrote routines years ago that stored files as arrays in scripts.. sounds kind of like what you want.
I haven't used WinBatch for 3+ years now, just read this forum from time to time, but I'll see if I can dig them up from an old pc and post them if you like?
Title: Re: Feature Request
Post by: JTaylor on November 12, 2021, 04:54:01 PM
Good to hear from you.  Hope all is well.

Appreciate the thought.  I have something that will work but always open to seeing other ideas.   Don't go to a lot of work hunting it down but I am sure others would be interested as well.  Not sure if my Feature request is worth Tony's time but being able to just point the compiler at a file without intermediate steps has a lot of appeal.   

Thanks.

Jim
Title: Re: Feature Request
Post by: stanl on November 13, 2021, 03:08:31 AM
Quote from: JTaylor on November 12, 2021, 07:42:47 AM
Just thought it would save the client extra steps.


This implies each client will have the compiler on their PC, or have I totally misunderstood the goal?
Title: Re: Feature Request
Post by: JTaylor on November 13, 2021, 08:15:33 AM
I am speaking of a particular one who does and who brings this up on a regular basis.

Jim