-
Posts
845 -
Joined
-
Last visited
Recent Profile Visitors
1,182 profile views
Zohar's Achievements
Universalist (7/7)
7
Reputation
-
Gianni reacted to a post in a topic:
[Solved] Sending a Key that is Registered as a Hotkey
-
[Solved] Sending a Key that is Registered as a Hotkey
Zohar replied to Zohar's topic in AutoIt General Help and Support
Hi Gianni Your idea is fantastic. Using ControlSend("","","",$HotKey) indeed does not Trigger the registered HotKey, and instead successfully passes it to the current window. Thank you so much for it, I am using it now as the better method for achieving this. BTW, you wrote that it works only fr current window, but out of curiosity I tried also to send it to a non-active window, and it works well there too. This is a great way to send a registered HotKey to the current program, without needing to Unset+Re-set it. -
Zohar reacted to a post in a topic:
[Solved] Sending a Key that is Registered as a Hotkey
-
[Solved] Sending a Key that is Registered as a Hotkey
Zohar replied to Zohar's topic in AutoIt General Help and Support
Thank you very much Nine. I will stay with that solution then. -
[Solved] Sending a Key that is Registered as a Hotkey
Zohar replied to Zohar's topic in AutoIt General Help and Support
Hi Nine Sure, I'll give you my exact issue. I set a Hotkey for the F9 key (and some other keys too), and indeed I use this all accross Windows, and it all works good. However, there are some specific programs, inwhich I don't want to capture this key (e.g. F9), and instead I want to pass the key to the program, so I can work with the program in a normal way, and not have some keys that are not pressable for that program, because they are taken by the hotkeys I set. An example of a program like that is PuTTY - a well known Terminal Program: In PuTTY for example I do need the F9 key to be sent to it when I press it, because there are many programs in the terminal that use F9 for various operations. (example: Midnight Commander has a bottom menu, with F1..F10 keys) So what I do in my AutoIt code is I identify the currently active window, and if it's one of the windows in my "Pass List" (which PuTTY is one such window), then I want to pass the hotkey to that program, instead of handling it and masking it from the program. As I wrote in the first post, the solution of Unset+Send+Re-set works, but I don't know if Unsetting and Setting the hotkey every time I press it is the best solution. That's why I asked it here.. -
Hi all There are situations where you registered a Hotkey for a certain key, and you want to send that key to the currently running program. What is the best way to do it? Currently, the what I do is Unset, Send, then Re-set: Func SendARegisteredHotKey($HotKey,$HandlerFunction_Name) ;This Functions Sends a Registered HotKey via Doing: Unset+Send+Set HotKeySet($HotKey) ;Unsetting, so I can Send it Send ($HotKey) ;Sending HotKeySet($HotKey,$HandlerFunction_Name) ;Setting it Back EndFunc Is there maybe a better way than Unsetting and then Re-setting the Hotkey every time we need to send it? Thank you
-
[Solved] How to Save a Dynamically Loading Webpage?
Zohar replied to Zohar's topic in AutoIt General Help and Support
OK I am posting here a simple answer: Simply sending [End] many times, till the page loads everything. To stop it, stop the script. While(True) Send("{End}") Sleep(2000) WEnd -
Hi all If you go to any Youtube Channel, and click the "Videos" tab, then you will see a list of all videos uploaded. This list does not appear in whole right from the start, you need to scroll down more and more, for it to load more videos to the list, until, in the end, you see the full list of Videos. Do you know how can I save to a file this webpage, but its full version? Thank you
-
Zohar reacted to a post in a topic:
Does Windows Have a Place for Calling Programs to Run at Shutdown?
-
Werty reacted to a post in a topic:
Does Windows Have a Place for Calling Programs to Run at Shutdown?
-
Thank you all. The purpose of this script it to Log. So the script does not have to run the whole Windows Session, only 1 second during Shutdown/Restart. Using OnAutoItExitRegister() indeed was an option, yet I prefer something by Windows, that happens during Shutdown, that way the script does not have to run the whole session, waiting for the Windows session to end.. That's a nice option, I might indeed use it. BTW, is there maybe a Registry option too? Similar to CurrentVersion\Run, just for Shutdown instead of Starting?
-
Zohar reacted to a post in a topic:
[Solved] SQLite in AutoIt: Parameterized Queries, and Receiving the Column Names after a SELECT Query
-
I see. Thank you. It complicates the code quite much, so I will not use it.. Well, you can quote the parameters properly, but if the value(s) comes from the user, and the user starts playing with the quotes (as a part of the content that he enters), then the fact that you quoted the values properly will not help.. Am I correct? For this reason, _SQLite_Escape() and _SQLite_Encode() are a must, when running an SQL Query that includes values that come from the user. BTW, I have a question regarding _SQLite_Escape() vs _SQLite_Encode(): If you want to store Binary data ("Blob") in the DB, then obviusly you will use _SQLite_Encode(). But If you want to store a String (Text) in the DB, then technically, you can use either one of them: _SQLite_Escape() or _SQLite_Encode(). So regarding storing a String, will it be correct to say that we should always use just _SQLite_Escape(), or are there cases where we store a String, and _SQLite_Encode() would be the right choice?
-
Zohar reacted to a post in a topic:
[Solved] SQLite in AutoIt: Parameterized Queries, and Receiving the Column Names after a SELECT Query
-
Hi benners Thank you very much for your reply. Indeed, seems that _SQLite_GetTable2d() does what I want to do in Q2, thank you very much. So I am now looking for an answer regarding Q1 - Parameterized Queries.. Hopefully that can be achieved too. Currently the closest thing to it that I found (in terms of Security) is using _SQLite_Escape() and _SQLite_Encode(). Of course these 2 functions are not Parameterized Queries, but they do give some protection from SQL Injection.
-
Hi all I would like to ask 2 questions regarding SQLite in AutoIt: The First Question: Is it possible to perform Parameterized Queries on SQLite in AutoIt? Something like this: SQLiteCommand C =new SQLiteCommand(DB1); C.CommandText = @" INSERT INTO T_Users (Name_First,Name_Last) VALUES (@Name_First,@Name_Last) "; C.Parameters.AddWithValue("@Name_First",Textbox_Name_First.Text); C.Parameters.AddWithValue("@Name_Last" ,Textbox_Name_Last.Text); C.ExecuteNonQuery(); Just in AutoIt, instead of in C# The Second Question: Is it possible to perform a SELECT query which returns a table, and receive not just the Data cells, but also another First row which will include the Column Names? As an example, instead of receiving this: I wish to receive this: Thank you very much
-
[Solved] Browser Automation in Android
Zohar replied to Zohar's topic in Developer General Discussion
I'm updating this thread in case someone finds it thru the Search, and needs a solution. The simplest way to do Browser Automation on Android, is to use a Browser that supports Add-ons, and then write the add-on with the web-automation code you need. An example of such a browser on Android is Kiwi Browser.