How do I randomly pick an icon for a pen drive? - autorun

I've seen a tutorial online that explained how to change the icon of a pen drive once inserted using an autorun.inf file and a .ico file, and it worked perfectly, but I wanted to know if there's a way to choose a random file from a list of .ico files inside the pen drive.
Here's the code I'm using for the normal icon
[Autorun]
Icon=IconName.ico
Label=PENDRIVE
If this can't be directly done using the autorun.inf file, please let me know an alternative method, even if it requires other files (such as .vbs files)
Here's the website I used just in case
https://www.windowscentral.com/how-set-custom-icon-removable-drive-windows-10

Related

Add link to PDF within a PDF file using relative addressing

I want to add a link to some text within a PDF that will bring up another PDF that is located in the same folder. I wish to use relative addressing so that the PDF suite is transportable to other users and computers. I wish this to work on Linux and Macs.
LibreOffice Draw, despite promises, writes out the link address as a full path. Thus if taken to another computer with another user the link fails to work.
I tried manually editing the PDF files using vi and altered the link syntax so;
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S/URI/URI(Content/Information.pdf)>>
where the target file, "Information.pdf" is in a subdirectory "Contents".
On Linux using Document Viewer, it works! On an Apple, Preview (a PDF viewer) interprets the target file needs to be opened by some application. Adobe Reader doesn't like this syntax either. I tried prefixing the filename with the keyword "file:" which works for a full path but not with relative addressing.
Does anyone know what syntax might work for me
Editing a PDF you can select text and add a hyperlink using LibreOffice Draw. It is then possible to edit the PDF file with a text editor such as vi.
To find the line with the link search for the filename of the target. One problem is that LibreOffice insists in using a fully qualified domain name to locate the file and this won't work after the file is moved, say to another computer. The unedited line should be similar to;
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S/URI/URI(File:<fullpathname>/Content/Information.pdf)>>
Where Content/Information.pdf is the link target in the same directory as the linking pdf. This line should be changed to
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S /Launch/F(Content/Information.pdf)>>
This works on Unix and MacOs

Always show the file extension inside the folder using vb.net

Currently, I am working on an application that will need to always show the file extensions of the files inside the folder.
Example:
I have a folder named Awards and the Contents are Images.
Contents:
As you can see, the file extension is hidden.
But when you click the options red boxed on the image. the file extension will be shown.
My question is, Is there a way to check the checkbox on the Image using vb.net? If it is possible? How??
Thank you and Regards,

How can I upload a whole folder of PDF files, So that I can skim through each file without having to upload each one of them individually

I have a folder of PDF files, what I want to do is build a small app with directional arrows that when pressed should upload the next PDF file from the uploaded/Selected folder.
I have tried uploading single PDF and I was able to view it, but I'm unable to find any good resource on how to upload a whole directory inside the application for me to not upload each PDF every single time.
I should be able to change my current opened PDF to the next one inside the folder.
The way to do this in Vue is as follows:
Make a input field and attach the event "v-on:input" with the function that will be called when the input is selected.
Don't forget to add "webkitdirectory mozdirectory" for firefox and chrome browsers.
Inside the function fetch the input query via "document.querySelectorAll('input');". The information of files will be inside files object.

Illustrator/PS images when sending to another computer?

I'm not sure how Photoshop works but when I receive an AI file from another computer I get an error regarding the images:
'Could not find the link file 'exampleimage.jpg'.
So I'm guessing the other person would have to send me the images separately?
Is this how Illustrator works?
I'm sure for Photoshop you don't have to do this?
Any info would be helpful.
Cheers
In Illustrator, if you go to menu File/Place, this will allow you to place other art files directly into your open illustrator document. If someone gives you that illustrator file and they do not give the "placed" files as well, when you open the illustrator document it will give you that error message because it cannot locate those files that were placed.
While using the "place" command in Illustrator, if the "link" check box is selected, anytime a placed file into illustrator gets edited and saved outside of illustrator, the edits made to that placed file will update the changes in Adobe Illustrator.
If the photos in their document are not embedded, you will need the images separately. Once you have the images, when you open the file on the new computer, you may need to manually associate the photos with each placeholder to make sure it renders properly.

Export Video from powerpoint using VBA

I want to export a video from powerpoint using VBA. This video was uploaded from the PC and not using links. I saw that this is possible for the images using this line of code:
ActivePresentation.Slides(1).Shapes(1).Export "C:\Cover.PNG", ppShapeFormatPNG
but I couldn't do the same for videos.
Do you simply need to extract the original video from the PPTX file? If so, rename the file to give it a .ZIP extension, open the zip file, browse for the media folder and in it, you'll find copies of any inserted (but not linked) sounds, videos and pictures.
If you have routines for working with ZIP files in VBA, you could probably work out how to do the same thing.
A possible alternative: size the video to fill the slide, then use PPT's SaveAs method to save as a WMV.