Re: [Sikuli-driver] [Question #99151]: How can I script the [cmd + A] (select all) shortcut?

2022-08-25 Thread Mical Tech
Question #99151 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/99151

Mical Tech posted a new comment:
Thanks @timkawa i will apply it on https://www.tinashehair.com/product-
category/wigs/high-density-wigs/

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #668968]: Capture script run on video.

2022-08-04 Thread Mical Tech
Question #668968 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/668968

Mical Tech proposed the following answer:
In the example below, I'm trying to capture all the videos in this
script. However, I'm only able to capture the first video. I understand
this has to do with getElementById and not querySelectorAll, but I'm not
sure how to implement it in this script.

var videoId = document.getElementById("wistia_video");
var uniqueVideoId = Array.from(videoId.classList)
  .find((c) => c.startsWith("wistia_async_"))
  .substring(13);
// console.log(uniqueVideoId);

const clickToPlay = document.querySelectorAll('.wistia')[0];

clickToPlay.addEventListener('click', function() {
  const playVideo = clickToPlay.querySelectorAll('.wistia__overlay, 
.embed-youtube__play');
  Array.from(playVideo).forEach((elem) => elem.remove());

  //supporting scripts
  let wistiaSupportScripts = [
`https://fast.wistia.com/assets/external/E-v1.js`,
//adds jsonp file to provide security over requests
`https://fast.wistia.com/embed/medias/${uniqueVideoId}.jsonp`
  ];

  //loads supporting scripts into head
  for (var i = 0; i < wistiaSupportScripts.length; i++) {
let wistiaSupportScript = document.createElement("script");
wistiaSupportScript.src = wistiaSupportScripts[i];
let complete = false;
if (!complete && (!this.readyState || this.readyState == "loaded" || 
this.readyState == "complete")) {
  complete = true;
}

let wistiaContainers = document.querySelector(".wistia");

wistiaContainers ? 
document.getElementsByTagName("head")[0].appendChild(wistiaSupportScript) : 
console.log("No Wistia videos here.");
  }

  window._wq = window._wq || [];
  _wq.push({
//globally scoped
id: uniqueVideoId,
options: {
  autoPlay: true,
  volume: 0.5
},

onReady: function(video) {
  video.bind("play");
}
  });
});

Copy from https://totoposition.com

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp