Google Spreadsheet - how to modify image that has assigned script? - google-apps-script

Everywhere I've read, it says to create a "button" in Google Spreadsheet you need to insert an image and assign a script to it. Easy enough. Done.
Now how do I modify that image? Clicking on the image runs the script. I cannot right-click the image for any context menu. I cannot select the image in any other way. I cannot ever remove the image now.

Perhaps Slav was using a Mac when he tried it the first time. Strangely, in this specific scenario, the Mac equivalent of right-clicking (which is CTRL+click) really does not work. What works is CMD + click.

While you can "assign a script" to an image, you can also do so to a drawing - which is much easier to customize. Either way, you end up with a picture in the spreadsheet, and when you click on it a script is triggered.
To edit this behavior, just right-click the image or drawing. (I know you said you did this, but it DOES work. Just click - then let go.) An anchor will appear on the image or drawing, and from there you can access a menu to edit or delete the image or change the attached script.

So that was tricky to me because the anchor was invisible in my image; it had a black background. If you can't see the anchor on your image follow these steps:
Right click on the image, You should find that it now has resize handles
Move your cursor to the top right of the image until it changes to a hand that points with the index finger (like when you hover over a link)
Click
Do whatever you want (Edit, delete... etc.)

Related

Google Tag Manager Image Clicks

I am using Google Analytics on a Sharepoint site. On the main page, we have an image in an image carousel that once clicked will bring you to a different page on the site. I have tried everything to track clicks on this image in GTM - click url, click ID, css selector, etc. I can not figure out why my trigger never fires. I have attached the
image, what pops up when I click inspect, and variables that show up with the click in GTM preview... (This is the second half of the variables in preview).Three images total.
Good job on including all the relevant debugging info.
Judging from your inspect, you're looking at the image.
However, judging from your click event inspection, the click lands on an a.
I don't see the a in your DOM on the screenshot, but it may be either dynamically added, or just outside of the screenshot.
No matter. Let's start to carefully debug it. Make a trigger that would be triggered on anything that matches a. That's just a debugging trigger. Make sure it triggers on your image clicks.
Now, let's just make a simple CJS variable that would console.log({{Click Element}}). No need to use it anywhere, just make it. Go to the debug view again, try clicking the banner again and look in the console for something that would look like this:
See that pretty element? Now the wonderful dev console allows you to copy JS path to this element and do whatever you want with it. Mainly, comfortably and quickly test CSS selectors against this element. I suggest changing the selector JS console generated. It should work (unless the page is too dynamic), but it would be fragile. Having the element, however, you'll be able to make your own selectors.

How to make button movable in google sheet?

I am making a GUI-based data management system using google sheet and app script. I have inserted two buttons using the draw option. But I cannot move that button to the bottom of the sheet where it needs to be. Whenever I tried to move that button a red line is appearing there; as you can see on the image. So please help me what should I do?enter image description here
The red line in simply a rule line. Its purpose is to help you line up the drawings. In your screenshot, the rule line shows that the bottom of Update currently lines up with the bottom of Next.
You can go ahead and drag across the line to move a drawing further down. To make drag and drop easier, you may want to temporarily unassign scripts in the buttons, or select a button by right-clicking it and then move it using the arrow keys rather than the mouse.

How Do I identify the background image of this site? I am cloning a site for Wordpress

I am cloning https://www.sovereignselfdefense.com per request from the owner. To create a Wordpress site. The site that is currently up is a Kajabi site. I have downloaded all images from the Kajabi site by simply right clicking the site and clicking download. I made the Wordpress theme and the images that did not download (shown with arrows) display fine in the custom wordpress theme.
All images, except these images in the CTA (for example, the gentleman with his arms out) are downloaded.
The client is transferring from Kajabi to Wordpress. I am afraid that the cloned wordpress theme is getting these images from the Kajabi site and, when said site is taken down, that I wouldn't be able to get these images. The Wordpress theme works, and displays these images for now.
I used Google Chrome Inspect Elements to try to find what this image is, and how this image is displaying. I am confused.
I'm requesting some tips on how to identify how the site loads these images in the CTA, so I can download them and link the wordpress theme's html accordingly. If someone could teach me how to identify one image, I believe I will be able to identify the rest of the images. Thank you for helping out.
In the inspect you can see the html code there is style expand it and you can access the background image's URL.I have just highlighted in the images.
They have attached a style block before the parent div of any container which has a background image just expand that style tag and get the image.
Image-1:
Image-2:
Image-3:
Image-1: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/tzJ4ad46RcSJinm7qbnO_Edited-image.png
Image-2: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/qqHvByszR1iu2rvfEQwg_defending2.jpg
Image-3: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/AWzmDDsWTlKOdoWPatUA_SovereignSelfDefenseBrandingPhotography-59.jpg
By clicking the image if you can drag it directly to your desktop that means that image is used by
<img src="">
tag in the code. Either it's used through css.
For your code please check the css file and you will get the image use as "background-image:url()" or you can check through inspect element section by section.
If you are using Google chrome then you can download and install this cool extension.
I'm a Gentleman
Here is the description from that link.
Easily save images with a click, gestures or the extension button.
Save images with one click by using the alt + click hotkey (holding the alt key and clicking the image).
Or save images by dragging them (drag the image slightly on any direction).
Download every image on the page by using the extension button (green button on the top right).
Note: The images are downloaded in the default directory for downloads of Chrome.
Installation Note: After installing, Chrome doesn't add any extensions to the currently opened tabs (so, you have to reload the tabs that were opened before the extension was installed to work it to work on them).
Also, you can inspect the page. below is the step on how to access inspect Element.
Right-click anywhere on the webpage, and at the very bottom of the menu that pops up, you will see "Inspect." Click that.
Click the hamburger menu (the icon with 3 stacked dots) on the far
right of your Google Chrome toolbar, click More Tools, then select
Developer Tools.
Now if you want to find out the image you can simply find it by clicking CTRL+F and type like .png or .jpg any other extension that you want to find.
Here is the example.
You can click right click then click save image as and when you are saving it.under the name you will find the type.
Some websites make it almost impossible to get the image. I remember trying to save a background theme image from the old gmail.
If you find yourself in that situation, open the Developer Tools, go to Network, filter by Images then sort by Size descending, so you get the biggest image to be the first one, then hover over each file to find your image.
You want to sort by the file size, because most of the times, the big background images are the largest in size.
Just checked out your website out..
Image 1
You can find this right below the line where the section id is 1574286919067
Image 2
Similar to the first image, this is under the section 1589827030126
Image 3
Once again, under section 1589828889742
Hopes this helps you out.. Let me know if you want to have anymore queries about the same.
The images itself:
-> Image 1: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/tzJ4ad46RcSJinm7qbnO_Edited-image.png
-> Image 2: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/qqHvByszR1iu2rvfEQwg_defending2.jpg
-> Image 3: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/AWzmDDsWTlKOdoWPatUA_SovereignSelfDefenseBrandingPhotography-59.jpg

If I open up <img> src in a new window, a blank window opens

When I try to open up the source of a small .png, only a black screen is available.
I need to copy these images. How do I go about this?
The Example:
Website
https://www.property24.com/property-values/160-alexander-street/brooklyn/pretoria/gauteng/c3dhjiriz2h3ss3nezycf2iqpbnejigrnvvtx4z2vrsw6wztd2wq
Image
<img src="/ListingReadOnly/GetImage?id=8ab6ea84-83d9-4114-b73e-15edffa72d74" alt="Last sales price of the property">
Thanks in advance!
The path to your image in your example code seems to be a relative path so copying and pasting it (the path) into anther tab wouldn't work. If you're using Chrome try one of these:
Right click on the image and select "Copy Image"
Right click on the image, select "Save image as...", (Image downloads), click the down arrow on the right side of the download and select "Show in Folder", Selected the image in the open explorer and copy it as you would a normal file
Right click on the image, select "Open in new tab", copy it from there
Left click on the image and drag it to your desktop (windows), copy it from there
Let me know if this works.
When I looked up the source of the link that you've provided, I can't find any image of ID: 8ab6ea84-83d9-4114-b73e-15edffa72d74. It probably might be some server side change.
Looking at Alt of the image, I hope, you're looking for the image next to the text: "Last sold price:"
There's no need for you to dig up and find the source. Just right clicking on that image in Chrome gave me an option to open it in new tab. From there you can save it or copy-paste, or whatever.
EDIT: This is the URL of the image I got: https://www.property24.com/ListingReadOnly/GetImage?id=1e82e647-2b26-4dfe-a519-904be5215045
EDIT EDIT: Yes, clicking on the link I gave now also loads a black screen. So, the best way around this is to open the link of the webpage (https://www.property24.com/property-values/160-alexander-street/brooklyn/pretoria/gauteng/c3dhjiriz2h3ss3nezycf2iqpbnejigrnvvtx4z2vrsw6wztd2wq), right click on that image and open it in new tab (or directly sve it) and upload it somewhere else to create its URL.
I hope that helps.
So, let me get things straight. You want to get the map image? if you are using Chrome: You can right click and click "open image in new tab". you then can download the image from there.
Image

Selenium: How can I click through a transparent overlay?

I have an element that fires some javascript on click.
Partially covering the element is a mostly-transparent graphic, which passes all events to that element. This way, regardless of if the overlay or the element is clicked, the element gets the events.
I'm trying to write a test in selenium that clicks the element under test and verifies the behavior, however the chrome webdriver tells me it can't click the element because the overlay will get the click event.
That is fine, though... How do I tell selenium that I don't care, to click anyways? I don't want to specifically click the overlay (in this test), the overlay is just eye-candy so the test should still work even if I remove the overlay.
edit:
To make clear... I want it to click in wherever it would have, if the overlay wasn't there. this way it'll click the element if there is no overlay, but click the overlay if covered.
You will not be able to click on the object under the overlay as Selenium has been written to only access what a user can access. If a manual user cannot click through then neither can Selenium.
You could either fire JavaScript directly on that object via the javascript_executor method, or alternatively, perform the interaction which will remove the overlay in your test
I could resolve this issue: In my application top header was visible and i clicked on one of the top elements (which was visible) and could continue with rest of the script execution
I solved this issue by clicking the coordinates of the close button.
Check out this answer. I showed how to click on the little "x" there, without needing to know the name of the actual button. Sometimes its easier to find the class of the image, for example.
Worst case, find the closest element to the button and change the last method to move_to_element_with_offset(element,x, y) to go from the element you found to the coordinates of the button on screen.
Once you do that, the overlay disappears and you can click as normal.