MadCave Posted July 31, 2024 Posted July 31, 2024 Hi all script gurus out there. Here is a person who is bad on scripting but in "need" of a function. Hope some can be of assistant Here is the scenario I am running a stream with OBS and the source is a IP camera using rtsp The problem is that OBS is kind of buggy and the rtsp stream freezes sometimes. (quite known issue) I found a script someone had made for solving it but it did not work. What I want is to send a key combination with a timer. And then wait for a specified time and then do the same. I have started with this script but i can't figure out how to setup the timers. I am not good at reading wikki's about this kind of things sadly. Quote #include <Array.au3> Global Const $sFullPath = "C:\Program Files\obs-studio\bin\64bit\" Global Const $sPIDname = "obs64.exe" Global Const $sWinTitle = "[TITLE:OBS; CLASS:Qt5QWindowIcon]" Global Const $sWinText = "OBS 30.1.2" Global Const $sSendHide = "{CTRLDOWN}H{CTRLUP}" ; OBS hotkey to hide media (stop) Global Const $sSendShow = "{CTRLDOWN}S{CTRLUP}" ; OBS hotkey to show media (play) So what i need in that is a timer that telling the script to send the keycombo then a time to wait then repeat the function I hope any of you out there have a suggestion how to make this possible :)
Moderators Melba23 Posted July 31, 2024 Moderators Posted July 31, 2024 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Nine Posted July 31, 2024 Posted July 31, 2024 (edited) Use AdlibRegister with the time you want between each Send. Then just create a Sleep While Loop to keep your script running. Try it and come back if you need further help. When your post code, please use the method shown in the link. Edited July 31, 2024 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Andreik Posted July 31, 2024 Posted July 31, 2024 Check in help file AdlibRegister() for an easy way or if you want to calculate the time by yourself look for TimerInit() and TimerDiff().
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now