Leaderboard
Popular Content
Showing content with the highest reputation on 07/22/2018 in all areas
-
Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 3 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left. Windows 10 style right click menu Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF Changelog: Download UDF with example:1 point
-
StreamLabs OBS NamedPipe Toggle Recording
argumentum reacted to JRSmile for a topic
Hi, just for reference. you can control the streamlabs OBS client via Named Pipes like so: Local $sMessage = '{"jsonrpc": "2.0","id": 1,"method": "toggleRecording","params": {"resource": "StreamingService","args": []}}' $handle = FileOpen("\\.\pipe\slobs", 2) FileWriteLine($handle, $sMessage) FileClose($handle) the api can be found here: https://stream-labs.github.io/streamlabs-obs-api-docs/docs/index.html1 point -
Seems to be Windows 10 enumerates in a diferent way... I think this should work: Opt("MustDeclareVars", 1) Global Enum $eRender, $eCapture, $eAll, $EDataFlow_enum_count Global Enum $eConsole, $eMultimedia, $eCommunications, $ERole_enum_count Global Const $CLSCTX_INPROC_SERVER = 1 Global Const $E_NOTFOUND = 0x80070490 Global Const $S_OK = 0 Global Const $CLSID_MMDeviceEnumerator = "{BCDE0395-E52F-467C-8E3D-C4579291692E}" Global Const $IID_IMMDeviceEnumerator = "{A95664D2-9614-4F35-A746-DE8DB63617E6}" Global Const $tagIMMDeviceEnumerator = _ "EnumAudioEndpoints hresult(int;dword;ptr*);" & _ "GetDefaultAudioEndpoint hresult(int;int;ptr*);" & _ "GetDevice hresult(wstr;ptr*);" & _ "RegisterEndpointNotificationCallback hresult(ptr);" & _ "UnregisterEndpointNotificationCallback hresult(ptr)" Global Const $IID_IMMDevice = "{D666063F-1587-4E43-81F1-B948E807363F}" Global Const $tagIMMDevice = _ "Activate hresult(struct*;dword;ptr;ptr*);" & _ "OpenPropertyStore hresult(dword;ptr*);" & _ "GetId hresult(wstr*);" & _ "GetState hresult(dword*)" Global Const $IID_IDeviceTopology = "{2A07407E-6497-4A18-9787-32F79BD0D98F}" Global Const $tagIDeviceTopology = "GetConnectorCount hresult(int*);GetConnector hresult(int;ptr*);" & _ "GetSubunitCount hresult(int*);GetSubunit hresult(int;ptr*);GetPartById hresult(int,ptr*);GetDeviceId hresult(ptr*);GetSignalPath hresult(ptr;ptr;bool;ptr*)" Global Const $IID_IConnector = "{9c2c4058-23f5-41de-877a-df3af236a09e}" Global Const $tagIConnector = "GetType hresult(ptr*);GetDataFlow hresult(ptr*);ConnectTo hresult(ptr);Disconnect hresult(none);IsConnected hresult(int*);" & _ "GetConnectedTo hresult(ptr*);GetConnectorIdConnectedTo hresult(wstr*);GetDeviceIdConnectedTo hresult(wstr*)" Global Const $IID_IPart = "{AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9}" Global Const $tagIPart = "GetName hresult(wstr*);GetLocalId hresult(uint*);GetGlobalId hresult(wstr*);GetPartType hresult(ptr);GetSubType hresult(ptr);" & _ "GetControlInterfaceCount hresult(uint*);GetControlInterface hresult(int;ptr*);EnumPartsIncoming hresult(ptr*);EnumPartsOutgoing hresult(ptr*);" & _ "GetTopologyObject hresult(ptr*);Activate hresult(dword;struct*;ptr*);RegisterControlChangeCallback hresult(ptr);UnregisterControlChangeCallback hresult(ptr)" Global Const $IID_IPartsList = "{6DAA848C-5EB0-45CC-AEA5-998A2CDA1FFB}" Global Const $tagIPartsList = "GetCount hresult(uint*);GetPart hreuslt(uint;ptr*)" Global Const $IID_IAudioMute = "{DF45AEEA-B74A-4B6B-AFAD-2366B6AA012E}" Global Const $tagIAudioMute = "SetMute hresult(bool;ptr);GetMute hresult(int*)" MUTE() Func MUTE() Local $hr = -1 Local $oMMDeviceEnumerator = ObjCreateInterface($CLSID_MMDeviceEnumerator, $IID_IMMDeviceEnumerator, $tagIMMDeviceEnumerator) If @error Then ConsoleWrite("!Error Creating IMMDeviceEnumerator Interface" & @CRLF) Exit EndIf Local $pDevice = 0 $hr = $oMMDeviceEnumerator.GetDefaultAudioEndpoint($eRender, $eConsole, $pDevice) If FAILED($hr) Then ConsoleWrite("!Error Getting Default Render Endpoint Device" & @CRLF) $oMMDeviceEnumerator = 0 Exit EndIf Local $oMMDevice = ObjCreateInterface($pDevice, $IID_IMMDevice, $tagIMMDevice) If @error Then ConsoleWrite("!Error Creating IMMDevice Interface" & @CRLF) $oMMDeviceEnumerator = 0 Exit EndIf Local $pDeviceTopology = 0 $hr = $oMMDevice.Activate(__uuidof($IID_IDeviceTopology), $CLSCTX_INPROC_SERVER, 0, $pDeviceTopology) If FAILED($hr) Then ConsoleWrite("!Error Getting Device Topology" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 Exit EndIf Local $oDeviceTopology = ObjCreateInterface($pDeviceTopology, $IID_IDeviceTopology, $tagIDeviceTopology) If @error Then ConsoleWrite("!Error Creating IDeviceTopology Interface" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 Exit EndIf Local $pConnEndpoint = 0 $hr = $oDeviceTopology.GetConnector(0, $pConnEndpoint) If FAILED($hr) Then ConsoleWrite("!Error Getting endpoint Connector" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 $oDeviceTopology = 0 Exit EndIf Local $oIConnector = ObjCreateInterface($pConnEndpoint, $IID_IConnector, $tagIConnector) If @error Then ConsoleWrite("!Error Creating IConnector Interface" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 $oDeviceTopology = 0 Exit EndIf Local $pConnDevice = 0 $hr = $oIConnector.GetConnectedTo($pConnDevice) If FAILED($hr) Then ConsoleWrite("!Error GetConnectedTo Device" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 $oDeviceTopology = 0 Exit EndIf Local $oConnDevice = ObjCreateInterface($pConnDevice, $IID_IConnector, $tagIConnector) If @error Then ConsoleWrite("!Error Creation oConnDevice(IConnector) Interface" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 $oDeviceTopology = 0 Exit EndIf Local $pPart = 0 $hr = $oConnDevice.QueryInterface($IID_IPart, $pPart) If FAILED($hr) Then ConsoleWrite("!Error Getting Part" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 $oDeviceTopology = 0 $oConnDevice = 0 Exit EndIf Local $oIPart = ObjCreateInterface($pPart, $IID_IPart, $tagIPart) If @error Then ConsoleWrite("!Error Creating IPart Interface" & @CRLF) $oMMDeviceEnumerator = 0 $oMMDevice = 0 $oDeviceTopology = 0 Exit EndIf ConsoleWrite(">>>>>>>>>>>>>>>>>BEGIN<<<<<<<<<<<<<<<<<<<<" & @CRLF) GetPart($oIPart) $oIPart = 0 EndFunc Func GetPart(ByRef $oIPart) Local Static $iIndex=0 Local $sPartName = "" Local $PartLocalId = "" Local $hr = -1 ConsoleWrite("+Part" & @CRLF) $hr = $oIPart.GetName($sPartName) If FAILED($hr) Then ConsoleWrite("Not Part Name" & @CRLF) Return $hr EndIf $oIPart.GetLocalId($PartLocalId) If FAILED($hr) Then ConsoleWrite("Not Part ID" & @CRLF) Return $hr EndIf ConsoleWrite(">" & $sPartName) ConsoleWrite(" ID: " & $PartLocalId & @CRLF) If True Then Local $pIAudioMute = 0 Local $bMute = 0 Local $oIAudioMute = 0 $hr = $oIPart.Activate($CLSCTX_INPROC_SERVER, __uuidof($IID_IAudioMute), $pIAudioMute) If SUCCEEDED($hr) Then $iIndex+=1 If SUCCEEDED($hr) And $iIndex=4 Then $iIndex=0 $oIAudioMute = ObjCreateInterface($pIAudioMute, $IID_IAudioMute, $tagIAudioMute) If @error Then ConsoleWrite("!Error Creating IAudioMute Interface") EndIf $hr = $oIAudioMute.GetMute($bMute) If FAILED($hr) Then ConsoleWrite("!Error Getting Mute State" & @CRLF) EndIf $hr = $oIAudioMute.SetMute(Not ($bMute), Null) If SUCCEEDED($hr) Then ConsoleWrite("!MUTE: " & (($bMute = False) ? "ON!" : "OFF!") & @CRLF) TrayTip("!MUTE: " & (($bMute = False) ? "ON!" : "OFF!"), "Danyfirex", 2, 1) Sleep(2000) EndIf EndIf EndIf Local $pIncomingParts = 0 $hr = $oIPart.EnumPartsIncoming($pIncomingParts) If ($hr = $E_NOTFOUND) Then ConsoleWrite("Not incoming Parts in Part" & @CRLF) Return $S_OK EndIf If FAILED($hr) Then ConsoleWrite("!ERROR Enumerating incoming Parts" & @CRLF) Return $hr EndIf Local $oIPartsList = ObjCreateInterface($pIncomingParts, $IID_IPartsList, $tagIPartsList) If @error Then ConsoleWrite("!Error Creating IPartsList Interface") EndIf Local $iNParts = 0 $oIPartsList.GetCount($iNParts) If FAILED($hr) Then ConsoleWrite("Couldn't get count of incoming parts") Return $hr EndIf Local $pIncomingPart = 0 Local $oIPart2 = 0 For $i = 0 To $iNParts - 1 $hr = $oIPartsList.GetPart($i, $pIncomingPart) If (FAILED($hr)) Then ConsoleWrite("Not Got Part" & @CRLF) $oIPartsList = 0 Return $hr EndIf Local $oIPart2 = ObjCreateInterface($pIncomingPart, $IID_IPart, $tagIPart) If @error Then ConsoleWrite("!Error Creating IPartsList(2) Interface") $oIPartsList = 0 Return $hr EndIf $hr = GetPart($oIPart2) If FAILED($hr) Then $oIPartsList = 0 $oIPart2 = 0 Return $hr EndIf Next $oIPart2=0 Return $S_OK EndFunc ;==>GetPart Func __uuidof($sGUID) Local $tGUID = DllStructCreate("ulong Data1;ushort Data2;ushort Data3;byte Data4[8]") DllCall("ole32.dll", "long", "CLSIDFromString", "wstr", $sGUID, "struct*", $tGUID) If @error Then Return SetError(@error, @extended, 0) Return $tGUID EndFunc ;==>__uuidof Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED Func FAILED($hr) Return ($hr < 0) EndFunc ;==>FAILED Saludos1 point
-
CACLS in Autoit
FrancescoDiMuro reacted to Jos for a topic
Merged all three places you posted into this thread... lets try staying here now. Jos1 point -
FileMove problem in Windows 10 "length limit?"
Earthshine reacted to careca for a topic
FileMove(@ScriptDir&'\test.txt', 'Thisfilenameisbiggerthan22charsfortesting.txt') 40+ chars and it worked fine in w10 x641 point -
As I was thinking the issue is that the IAudioMute interface can't be created. I'll look deep on this later. Saludos1 point
-
FileMove problem in Windows 10 "length limit?"
user4157124 reacted to juniq for a topic
ugh.. forget it.1 point -
1 point
-
FileMove problem in Windows 10 "length limit?"
Earthshine reacted to jchd for a topic
The limit, if exists, is on the complete pathname length.1 point -
I have had to update two of the KindEbook Suite programs, due to a conversion issue I discovered recently (last few days). Basically, an AZW3 or MOBI ebook file, when converted to EPUB, doesn't always end up with a cover displaying in the Calibre Ebook Viewer, and I imagine this also is the case for ebook devices etc. This occurs sometimes, even when an image file exists in the source and can be found in the 'Images' folder inside the resulting EPUB file. I used the wonderful Epub editing/creating program Sigil, to confirm this. NOTE - For those who don't know, an EPUB file is very much like a ZIP file, and contains HTML files and folders, some of which contain CSS and Images etc. Anyway, clearly something is wrong with the way the cover image has been set or specified in these instances. If the source was an AZW3 file, then the MOBI file which it is also converted to does correctly show the Cover image. That must mean, that it is somehow something related with the conversion to EPUB ... maybe the cover is wrongly specified in the source AZW3 file, but somehow not an issue when converted to MOBI. Or maybe the image file itself has some factor at play (not supported in an EPUB file). This is with ebooks already added to calibre, and which have a 'cover.jpg' file in the ebook folder, which was extracted from the source (AZW3 or MOBI) file, when the ebook was added to the calibre database. Clearly calibre can detect and extract the embedded image to file. You can see in the notes for each program below, how I have dealt with this issue. I admit though, that though my fixes work, I am not entirely happy with having to do them the way I have. Basically, with the first program, Batch Ebook Convert, I am removing the cover image from every conversion to EPUB, and then embedding the 'cover.jpg' file. This is because I have not found a calibre command to report on any embedded image file. If I could do that, then I would only embed where necessary. With Add Book & All Formats To Calibre, I have added an option to the FIND window GUI, to deal with EPUB ebooks that have already been converted and need fixing. Using drag & drop, you are basically adding or replacing the cover image with the 'cover.jpg' file found in the ebook's folder.1 point
-
This seems to be a little better - based on a script by UEZ #include <WindowsConstants.au3> #include <WinApi.au3> #include <GDIPlus.au3> _GDIPlus_Startup() ; Create GUI Local $hGUI = GUICreate('Test', 500, 300, -1,-1,$WS_POPUP, $WS_EX_LAYERED) GUISetBkColor(0xABCDEF) Local $idPic = GUICtrlCreatePic('', 0, 0, 500, 300) Local $hPic = GUICtrlGetHandle($idPic) Local $hGDIBmp = _GDIPlus_CreateBitmapRoundCornerRect() _WinAPI_DeleteObject(GUICtrlSendMsg($idPic, 0x0172, $IMAGE_BITMAP, $hGDIBmp)) _WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 255) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3 _WinAPI_DeleteObject($hGDIBmp) _GDIPlus_Shutdown() Func _GDIPlus_CreateBitmapRoundCornerRect($iW = 500, $iH = 300, $iColorBg = 0xFF505050, $iColorBorder = 0xFF505050, $iRadius = 15, $bGDIBmp = 1) Local Const $iX = 0, $iY = 0, $iPenSize = 1 Local Const $iWidth = $iW - $iPenSize, $iHeight = $iH - $iPenSize Local Const $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetSmoothingMode($hCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetTextRenderingHint($hCtxt, $GDIP_TEXTRENDERINGHINT_ANTIALIASGRIDFIT) Local Const $hPath = _GDIPlus_PathCreate() _GDIPlus_PathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY, $iRadius * 2, $iRadius * 2, 270, 90) _GDIPlus_PathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 0, 90) _GDIPlus_PathAddArc($hPath, $iX, $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 90, 90) _GDIPlus_PathAddArc($hPath, $iX, $iY, $iRadius * 2, $iRadius * 2, 180, 90) _GDIPlus_PathCloseFigure($hPath) Local Const $hBrush = _GDIPlus_BrushCreateSolid($iColorBg) _GDIPlus_GraphicsFillPath($hCtxt, $hPath, $hBrush) Local Const $hPen = _GDIPlus_PenCreate($iColorBorder, $iPenSize) _GDIPlus_GraphicsDrawPath($hCtxt, $hPath, $hPen) _GDIPlus_PathDispose($hPath) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hCtxt) If $bGDIBmp Then Local $hGDIBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hGDIBmp EndIf Return $hBitmap EndFunc1 point
-
spikespaz, There are many posts (often by me) on the forum which explain why the rule exists as it does, so I am not going to explain it yet again. Suffice to say that the site owner, and author of AutoIt, wrote those rules personally - so if you want to post in his forum you need to obey them. If that does not meet with your personal feelings of what should be allowed - tough. We cannot, and indeed have no wish, to determine what use people make of AutoIt - but we do, and most certainly will, police what is discussed in this forum. And so to prevent yet another Oozlum bird meeting a premature end, this thread is locked. M231 point
-
Hi, No. Try this one: HotKeySet("{ESC}", "Terminate") HotKeySet("{F2}", "OnOff") ;============================================================================= Local $Timer1, $RdmTime Local $On = 0 ;============================================================================= Func OnOff() If $On = 1 Then $On = 0 Else $On = 1 EndIf EndFunc ;==>OnOff ;============================================================================= Func _F3a_Func() ConsoleWrite('_F3a_Func - ' & @MSEC & @CRLF) EndFunc ;==>_F3a_Func ;============================================================================= Func _F4a_Func() ConsoleWrite('_F4a_Func - ' & @MSEC & @CRLF) EndFunc ;==>_F4a_Func ;============================================================================= While 1 If $On = 1 Then ;============================================================================= $RdmTime = Random(1000, 4000, 1) $Timer1 = TimerInit() Do _F3a_Func() Sleep(100) Until TimerDiff($Timer1) > $RdmTime Or $On = 0 If $On = 1 Then _F4a_Func() EndIf ;============================================================================= EndIf Sleep(100) WEnd ;============================================================================= Func Terminate() Exit 0 EndFunc ;==>Terminate ;=============================================================================1 point
-
In this example:- the hot key "Alt+h" allows you to set your own hot key to start notepad; and, the hot key "Alt+r" automatically sets a random hot key for you to start notepad. HotKeySet("!h", "_SetHotkey") ; Press Alt+h to initilize hotkey HotKeySet("!r", "_RandHotkey") ; Press Alt+r for random hotkey HotKeySet("{Esc}", "_Exit") Global $sInput While 1 Sleep(10) WEnd Func _RandHotkey() HotKeySet($sInput) ; Erase any previous HotKey. Local $aKey = ["!", "+", "^", ""], $aKeyDiscription = ["Alt+", "Shift+", "Ctrl+",""] ; Key and its description arrays Do Local $iPreKey = Random(0, 3, 1) Local $iPostKey = Chr(Random(97, 122, 1)) ; Gets one English lowercase alphabet ASCII character. $sInput = $aKey[$iPreKey] & $iPostKey Until $sInput <> "!h" Or $sInput <> "!r" ; Will not overwrite existing two HotKeys MsgBox(0, "Set Hotkey", 'New Hotkey is now "' & $aKeyDiscription[$iPreKey] & $iPostKey & '".') HotKeySet($sInput, "_Hotkey") EndFunc ;==>_RandHotkey Func _SetHotkey() HotKeySet($sInput) ; Erase any previous HotKey. $sInput = InputBox("Set Hotkey", 'Enter the letter (e.g. "!a") you want to use as a Hotkey (e.g. Alt+a).') HotKeySet($sInput, "_Hotkey") EndFunc ;==>_SetHotkey Func _Hotkey() Run("NotePad") EndFunc ;==>_Hotkey Func _Exit() Exit EndFunc ;==>_Exit1 point
-
As it seems that some members do not bother to read the "Announcements" section, I have added the above to the list of prohibited activities in the Forum rules. M231 point
-
dimez2018, You are being far from straight and I do not like the sound of what you are doing, so thread locked. M231 point
-
Alphabet - (Moved)
Draygoes reacted to FrancescoDiMuro for a topic
No secrets here, and I am helping you replying to your questions, but I like more the philosofy "Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime". And, since you had to say those things, and you are saying that I'm not helping, I'll give you one more help: The function Chr() returns the corresponding character of the number provided in the function as ASCII code. You should know that even alphabet letters could be represented as ASCII codes... And, the letter "A" ( uppercase ) corresponds to the number 65 in the ASCII Table. So, know you just have to put the right pieces of the puzzle to make your script work as you want. And, since it seems that you didn't read the Forum Etiquette ( look down in the signature ), it is clearly stated that: Usually asking for a script is not taken too well, within reason. Keep in mind that this is a support forum, so please acknowledge that. We are here to help you with your scripts, not to spoon-feed code to you. Best Regards.1 point -
C# Installer
232showtime reacted to Earthshine for a topic
you not going anywhere without .NET and SDKs1 point -
C# Installer
232showtime reacted to BrewManNH for a topic
If you want to be pedantic, then the answer to the OP is no, there's no installer for C#. You can download a package that allows you to be able to create C# programs, such as MonoDevelop or Visual Studio which includes a text editor and a program to compile the text into an exe.1 point -
1 point
-
1 point
-
Hi, There have been far too many occasions recently where the Mod team have been trying to determine whether a particular thread is legal and a member has posted offering help to the OP. If the Mods are concerned about a thread, please refrain from posting within it - and certainly do not offer anything at all useful - until the all-clear has been given. After this announcement has been posted, we will regard any future instances as unfriendly acts and the poster can expect to be sanctioned - you have been warned. M230 points