smithr355 Posted October 25, 2018 Share Posted October 25, 2018 I am trying to create a script that when you click on paint it will open a certain jpg. I have tried a few things but can’t get this working and any help would be greatly appreciated. Here are some things I’ve tried Run ( “mspaint.exe”, “xyz.jpg” ) Run ( “mspaint.exe”, “c:\users\username\documents\xyz.jpg Link to comment Share on other sites More sharing options...
xcaliber13 Posted October 25, 2018 Share Posted October 25, 2018 Try something like this Run('C:\Windows\System32\mspaint.exe') Sleep(2000) Send("!fo") Sleep(2000) Send("c:\users\username\documents\xyz.jpg") Sleep(2000) Send("!o") Link to comment Share on other sites More sharing options...
smithr355 Posted October 25, 2018 Author Share Posted October 25, 2018 Thank you for your reply. This is close to what I want but instead of it actually opening paint I just want the jpg to open. Link to comment Share on other sites More sharing options...
smithr355 Posted October 25, 2018 Author Share Posted October 25, 2018 So if I click the paint icon i dont want paint to open but a jpg instead. Link to comment Share on other sites More sharing options...
Earthshine Posted October 25, 2018 Share Posted October 25, 2018 (edited) no, it doesn't work that way. i don't see any good reason to do such a thing. Edited October 25, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted October 25, 2018 Share Posted October 25, 2018 you can use Photo Viewer like this from cmd line, still, photoviewer actually runs c:\%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1 That could be a batch file you call, the %1 would be the name of your image. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Davidowicza Posted October 25, 2018 Share Posted October 25, 2018 Why not just have a Desktop shortcut that has the Paint icon but it's path is to your .jpg? Earthshine 1 Link to comment Share on other sites More sharing options...
smithr355 Posted October 25, 2018 Author Share Posted October 25, 2018 Thank you, everyone, for your replies. Earthshine you are correct there is no good reason. Davidowicza I can not do that either. I should have stated this in the beginning that the whole reason I am trying to do this for. This is nothing more than a prank for my boss, we go back and forth pulling pranks on each other. So I thought it would be cool if I took an application he uses a lot "not necessarily paint" and when he clicked on it to open it would not open that but a jpg. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 25, 2018 Moderators Share Posted October 25, 2018 smithr355, You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing "prank" scripts - before you post again and then you will understand why you will get no help and this thread will now be locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts