Giter VIP home page Giter VIP logo

uideskautomation's People

Contributors

ddeltasolutions avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

skadefro

uideskautomation's Issues

How to use the repo to copy the link from Chrome extension button?

Hello:
I can use chrome extension to find an HLS link.
Add one Chrome extension for M3U8 sniffer:
https://chrome.google.com/webstore/detail/video-m3u8-sniffer-find-h/akkncdpkjlfanomlnpmmolafofpnpjgn
Launch Google Chrome to visit this URL: https://fullmatchesandshoo.koravidclub.com/embed/wjrBKmgwOp2eX

Then maybe have to install some M3U8 player extension, then I can see the M3U8 link detected by M3U8 sniffer, like this:
https://ccddnn610003.koralast.com/UpFiles/2022/4/24/42/224221/720p.m3u8

I used SPY tools to find M3U8 link, I got something like:
engine.GetDesktopPane().Pane("Chelsea vs West Ham United Extended - Google Chrom*").Document("Chelsea vs West Ham United Extended").Hyperlink("https://ccddnn610003.koralast.com/UpFiles/2022/4/2*").Label("https://ccddnn610003.koralast.com/UpFiles/2022/4/2*")

However, the information is not complete, the Hyperlink is not long enough to contain the full M3U8 link:
https://ccddnn610003.koralast.com/UpFiles/2022/4/24/42/224221/720p.m3u8
So, I want to know how I can either click on the “Copy” button to get the M3U8 link in clipboard or try to use the repo to get the Hyperlink directly.
Please advise!

Can I use the repo in .NET 6 winforms app (Windows 1)?

Hello:
I can use the repo in console project. But now I am using Visual Studio 2022, and I want to use the repo in a winforms app (target .NET 6.0) for Windows 10 PC. Since .NET 6.0 is in long time support, I don’t want to change program quite often.
But when I tried to install the NUGET package:
Install-Package UIDeskAutomation -Version 1.6.4
I got warning:
Warning NU1701
Package 'UIDeskAutomation 1.6.4' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0-windows7.0'.
Can you release a new version, which can be used in .NET 6.0 winforms app (for Windows 10/11)?
Thanks,

How I can find useful information by using SPY tools?

Hello:
I recently installed Telegram desktop (Version 4.0) for Windows 10. You can download it here: https://desktop.telegram.org/
Yes, you need a telegram account to login, but it is easy to get one.
I want to export some Channels chats to my local hard drive.
I can export some channels chats by following instructions, you can see the instructions like this:
Open the chat which you want to export. ...
Click on the 3 dots at top right. ...
In the Chat export settings Window, choose the additional items which you want to export. ...
Your export will be completed and Telegram will display the result.

But since I want to export some channels every day, so I want to use your repo to find how I can write some C# code to do the job.
But from SPY tools (version 3.0), I can’t see any useful information.
I added one small channel, it has only 81 subscribers, so its channel has very few chats.
But from SPY tools, almost all the running jobs in Telegram desktop have similar panes, how I can use the SPY tools to find useful information in order to export chat history.
Please advise,
Thanks,
ExportChannel

Can’t call console app from WinForms app using the repo.

Hello:
I can use the repo to upload one MP4 file in a console app.
The following is my C# code: (.Net 4.8 framework)

static int Main(string[] args)
{
string MP4_File_Name = args[0];
if (!File.Exists(MP4_File_Name))
return (-1);
string show_upload1 = string.Format("Upload time=[{0}], upload file is:", DateTime.Now.ToLocalTime());
Console.WriteLine(show_upload1);
Console.WriteLine(MP4_File_Name);
Engine engine = new Engine();
engine.Sleep(5000);
var window =
engine.GetDesktopPane().Pane("Upload | TikTok - Google Chrome");
window.Highlight();
window.ClickAt(207, 655);

var combo = engine.GetDesktopPane()
    	  .Pane("Upload | TikTok - Google Chrome").Window("Open").ComboBox("File name:");
combo.Highlight();
combo.SetText(MP4_File_Name);

var openBtn =
	engine.GetDesktopPane().Pane("Upload | TikTok - Google Chrome").Window("Open").Button("Open");
openBtn.Highlight();
openBtn.Press();
engine.Sleep(30000);

engine.GetDesktopPane().Pane("Upload | TikTok - Google Chrome").ClickAt(643, 852);
engine.Sleep(10000);

engine.GetDesktopPane().Pane("Upload | TikTok - Google Chrome").ClickAt(470, 630);
engine.Sleep(5000);
return 0;

}

When I run this alone, it works.
However, I have a lot of MP4 files to upload, so I had another WinForms app project, in which I call the program with necessary parameter (the file name) in a loop through all the MP4 files.
The following is my C# code: (.Net 6.0 on Windows 10)
public static async Task TikTok_Upload_MP4_File1(string mp4_file1)
{
int return_code1 = 0;
try
{
Process process = new()
{
StartInfo = new ProcessStartInfo
{
FileName = TikTok_Upload_CLI,
Arguments = mp4_file1,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true
},
EnableRaisingEvents = true
};
process.Start();
string output = process.StandardOutput.ReadToEnd();
bool has_return_code =
int.TryParse(output, out int return_code);
if (has_return_code)
return_code1 = return_code;
process.WaitForExit();
await Task.Delay(3000);
}
catch (NullReferenceException ex)
{
Debug.Print("[TikTok_Upload_MP4_File1]" + ex.Message);
}
return return_code1;
}

When I run the above code, it simply times out, there is no error. But the code didn’t run. (FileName = TikTok_Upload_CLI => this is the binary for the console app.)
Please advise on how I can integrate the console app in my WinForms app project.
Thanks,

How to fix a tricky issue?

Hello,
I have tried to write a program to upload some pictures to my facebook account. And I found some tricky issue.
You can upload photos/videos to your facebook account, from home page, click on photos/videos icon within the "What's on your mind, User Name? Photo/video" group.
The following code works for the first 4 files (photos or videos)
Console.WriteLine("Click on What's on your mind, … ? Photo/video");
UIDA_Label mind_video =
engine.GetDesktopPane().Pane("Facebook - Google Chrome").Document("Facebook")
.GroupAt("", 2).Group("Create a post").Button("Photo/video").Label("Photo/video");
mind_video.Highlight();
mind_video.Click();
engine.Sleep(1500);

However, from the 5th files, the above code stops working.
As I can see from the Spy tools, the UIDA_Label mind_video seems to change to another value, like:
engine.GetDesktopPane().Pane("Facebook - Google Chrome").Document("Facebook")
.GroupAt("", 3).Group("Create a post").Button("Photo/video").Label("Photo/video");

However, the label position remain the same.
Is it possible to always click on the same position, no matter what the engine consider the underlying label should be?
Thanks,

Can I try to use the repo for another tough issue?

Hello:
As I am using the repo., I found this seems to be a great tool, I can do many things with it.
Now, I want to know if I can something a little more difficult.
As you can see when you try to login to Tiktok account, you have to resolve a CAPACHA by sliding one image to the right and release it when a matching background image location is hit.
Let's say I can know the location of the matching background image, for example, its coordinates is (100, 100), and the starting point is like (10, 100).
Let me know what kind of code I can write to simulate to drag the image and release the image when it is needed?
I think I can use some image library, like EMGUCV to find the matching image location, but I also need the code to drag the image and release it on the exact location.
Please advise,
Thanks,

Can I use the repo to upload local file to a web site?

Hello:
I found your repo, it is rather new. I want to know if I can use the repo to upload local file to a web site.
You can upload local file to some web sites, by clicking on “Choose File” button, then the javascript actually open a native file open dialog in Windows 10, then you can pick up one file from the file open dialog, then click on “Open” button, then click on “Upload” button in the web page, you may have to type some words to give some explanation to the file being uploaded, then the file is uploaded.
Let me know if you can do this with the repo., if yes, I can give you a more detailed description for one specific web page for this job. I am using Visual Studio 2022 on Windows 10 PC.
Thanks,

How I can use the repo to type some command in a Python environment?

Hello:
Now, I have to run some Python command in a very specific Python environment.
To launch this environment is rather complicated, but it is way more complicated to set it up.
However, after setting up the environment, I only need to run some Python command in the environment.
But I want to use the repo to run some command, for the simplest one is: dir
However, I can’t find which automation item I can use to sendkeys like: dir.
The following is my C# code:

using System;
using System.Threading.Tasks;
using UIDeskAutomationLib;

namespace RunCondaStyleGAN3Test
{
public class Program
{

static async Task Main(string[] args)
{
await Task.Delay(10000);
int return_code = 0;
if (args.Length == 0)
{
Console.WriteLine("Please enter at least one command");
return -1;
}
else
{
Engine engine = new Engine();
UIDA_Document text_doc =
engine.GetTopLevel("Anaconda Prompt (Anaconda3)").Document("Text Area");
text_doc.SendKeys("dir");
}
Console.WriteLine("Done");
return return_code;
}
}
}

However, my code didn’t work.
Please refer to the Spy screenshot and let me know how I can run a simple command, like “dir”
Thanks,
UISpyFindCondaEnvironment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.