Rank: Newbie
Groups: Approved
Joined: 2/2/2022(UTC) Posts: 2
|
how to use gesture to search by images using the google image search engine or tiny eye,etc. Edited by user Tuesday, February 8, 2022 9:39:04 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
Yep, it is easy to search for an URL by Google or Yandex, or TinEye image search engine. But if you snip the screen or selected an image locally, you must get the URL. There is a snip image program ShareX which is open source on Github. You can create a workflow to upload a local image or snip an image then return an URL. Then do the image search. The following code is to get the select image from local explore or Desktop. The actionname is that you create in ShareX.
Code:var wndHandle = sp.ForegroundWindow().HWnd;
var desktopHandle = sp.DesktopWindowListView().HWnd;
var result = 1;
var selectedFiles;
var fullPath = "";
var isDesktop = false;
var success = false;
var actionName = "Upload to Imgur"
if(wndHandle.ToInt32() == desktopHandle.ToInt32() || sp.LastFocusControl().HWnd.ToInt32() == desktopHandle.ToInt32()) {
//Desktop
selectedFiles = sp.GetSelectedFilesOnDesktop();
isDesktop = true;
} else {
//Not Desktop
selectedFiles = sp.GetSelectedFilesInExplorer(wndHandle);
}
if(selectedFiles.Length != 0) {
fullPath = selectedFiles[0];
if(isDesktop) {
fullPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + "\\" + fullPath;
}
result = sp.RunProgram('D:\\Program Files\\ShareX\\ShareX.exe',
`"${fullPath}" -task "${actionName}"`,
'open', 'hidden', false, true, true);
if(result == 0) {
success = true;
sp.ShowBalloonTip("OK", "", "info", 1000);
}
}
if(!success) {
sp.ShowBalloonTip("Upload to Imgur", "Failed", "error", 1000);
}
sp.Sleep(2000);
//Wait for 1s or 2s then get the URL from the clipboard
//and use google image search engine to search the URL
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close