Jump to content

Zohar

Active Members
  • Posts

    841
  • Joined

  • Last visited

Everything posted by Zohar

  1. 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
  2. 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
  3. You're right.. Searching for windows registry run at shutdown indeed gives relevant results. I will try it now, thank you.
  4. 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?
  5. Hi all I need a small script to run every time the computer is Shut Down (or Restarted). While for Starting there's the known CurrentVersion\Run registry key, Is there something also for running a program just before Shutdown/Restart? Thank you
  6. Thank you very much jchd Does AutoIt have Functions for Sanitizing input strings? For example for SQL, for HTML, for JavaScript, etc..
  7. 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?
  8. 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.
  9. 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
  10. 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.
  11. Thank you very much Chimp. Can you please explain the RegExp line? What does "\w{2}" do?
  12. Hi all 4.5 years have passed since this question, and I assume the answers of several people here have also changed. I am adding a post in case someone finds this via the Search, and needs an answer. IE is now discontinued, and since my favorite browser is Firefox, then the solution I found was this: I write a Firefox Add-on, which does most of the automation that I need - the Web Automation part, and for the parts that it can't, I communicate from the Firefox Add-on to an AutoIt script, and then do what I need using AutoIt. For the Communication between the Firefox Add-on and AutoIt, I use TCP. The reason is since a Firefox Add-on is quite limited in what it can access on the computer, outside the browser, for security reasons. So TCP is the simplest way to achieve IPC between Firefox and the rest of the computer.
  13. OK then, thank you very much.
  14. Thank you Danp2 Looks interesting - I will test it. It returns a 256Byte array, is there a chance that there's also a function just for Modifier Keys, instead for All Keys like the current one?
  15. Hi all I have this function that I use for years, that checks if all Modifier Keys are up: Func KeyBoard_WaitForModifierKeysUp() While(_IsPressed("10") Or _IsPressed("11") Or _IsPressed("12") Or _IsPressed("5B") Or _IsPressed("5C")) ;Shift,Ctrl,Alt,LWin,RWin Sleep(50) WEnd EndFunc It uses the _IsPressed() function, and calls it 5 times on each run. While it works very well, I am curious If it's possible to achieve the same functionality, via another function, with only a single call. For example, a function that returns a bit-set, with 1 it for every modifier key, and then you test the bits.. I assume there isn't a built-in AutoIt function that does it, so maybe there's a Windows API function that can do it? Thank you
  16. Thank you Danyfirex Which keyboard mapping program do you use?
  17. Hi all I have just bought a new keyboard and mouse combo, it's the Logitech MK295: https://www.logitech.com/en-us/products/combos/mk295-keyboard-mouse-combo.920-009782.html (really nice keyboard and mouse BTW. I like how they look, and the keyboard's keys are really quiet. Definitely an improvement over my older keyboard) On the top part of the keyboard, there are 8 additional keys: I created HotKeySet()s for each one of them, and this is how I managed to map them: HotKeySet("{MEDIA_PLAY_PAUSE}" ,"ApplicationLauncher") HotKeySet("{VOLUME_MUTE}" ,"ApplicationLauncher") HotKeySet("{VOLUME_DOWN}" ,"ApplicationLauncher") HotKeySet("{VOLUME_UP}" ,"ApplicationLauncher") HotKeySet("{BROWSER_HOME}" ,"ApplicationLauncher") HotKeySet("{LAUNCH_MAIL}" ,"ApplicationLauncher") HotKeySet("{SLEEP}" ,"ApplicationLauncher") ;The only one that doesn't work HotKeySet("{LAUNCH_APP2}" ,"ApplicationLauncher") So out of 8 keys, I successfully capture 7 of them, and the only one I have a problem with, is the 7th one - the one with the Power icon and "PC" label. "{SLEEP}" doesn't seem to capture it.. I wonder, is there another key name that I should try, or does it happen because Windows so strongly hooks that key,that AutoIt cannot capture it? BTW, some additional info that might help: When I go to Control Panel -> Power Options, and switch to the "Advanced" tab, then the setting that handles this key is this: Originally it was set to "Stand by", and indeed whenpressing that 7th key, the computer would go to Sleep (not Hibernate). After I changed it to "Do nothing", as can be seen in the screenshot, then indeed that key does nothing. In both situations, AutoIt did not capture it.. Hopefully there's another Key Name I should try other than "{Sleep}", which didn't work.. Or, I should give up that key, and not use it with AutoIt, if it's not possible to capture it. Thank you
  18. Hmm Freeze=Off + Highlight Controls=On (and to make Freeze=Off express itself, we have to move the Focus away from the Window Info tool to any other window, by clicking some other window, or else Freeze=Off will not be expressed) Thanks.. BTW to make this easier for others, consider naming the MenuItem as "Highlight Controls even when Freeze=Off" or something with this meaning)
  19. Hi all I am using AutoIt Window Info tool quite often, and there's something I wonder about, since the first days of using AutoIt. When I drag the ViewFinder icon, from the AutoIt Window Info tool, to another window, then the target window/control is Highlighted (when the Target Window has standard controls, and not some specially drawn controls). So far so good. The problem is, that this Highlghting happens when the MenuItem in Menu: Options\Highlight Controls is Off, and If I select it, then the behavior does not change.. So in any case (Off or On), you get the controls highlighted. So is this a tiny bug - inwhich this MenuItem's state is ignored by the code? Or is it me missing something here?
  20. BTW, I planned to create a thread with 2 questions about AutoIt Window Info tool. Again it's something there that I wondered about for years, but kept putting aside, and finally decided to clear it out once and for all.. Do you get notifications for newly created topics that their title contain AutoIt Window Info tool too? If yes, maybe I should wait a month or 2 for things to cool down, before creating another thread..
  21. So that's why you're pissed at me? Because I prefer the Lite version over the Full one? (you developed the adaptations to AutoIt in both, no? so in any case I am using what you developed..)
  22. Hi pixelsearch Really thank you for this! OK so to summarize this: (and also include the fifth - Ctrl-Space, which was not mentioned) Complete Symbol (Ctrl-I, and also the same as Ctrl-Space): Completes an AutoIt Symbol, as defined in the file C:\Program Files\AutoIt3\SciTE\api\au3.api Complete Word (Ctrl+Enter): Completes from the dynamically formed list of terms, in the current Code Editor screen (useful for Variable Names, Function Names, and more - it can be any word (or space-less string) that appears in the current file, before or after the location of the cursor) Expand Abbreviation (Ctrl+B), and it's Windowed version Insert Abbreviation (Ctrl+Shift-R): Completes an Abbreviation as defined in a list stored in the file (Menu: Options\Open Abbreviations file) I must say that the second one - Complete Word (Ctrl+Enter), is really useful, and new to me. It enables completing names of Variables/Functions, which Ctrl-Space doesn't cover. Coming from Visual Studio, I was missing this. In Visual Studio, Ctrl-Space covers everything, combined, both language/framework terms, and also dynamically created words/terms, like Variable and Class/Method names. I really thank you for explaining this.
  23. Oh Nice trick. The command is completely identical.. So the different Bytes are probably some metadata that is affected by the current Time Thanks for it
×
×
  • Create New...