Leaderboard
Popular Content
Showing content with the highest reputation on 07/21/2015 in all areas
-
StreamHelper
Mobius and 2 others reacted to AdmiralAlkex for a topic
Give the script your username on Twitch or Hitbox (empty string to skip) and it'll alert you when the people you are following goes online. $sTwitchUsername = IniRead(@ScriptDir & "\Settings.ini", "Section", "Twitch", "") ;NAME ON TWITCH $sHitboxUsername = IniRead(@ScriptDir & "\Settings.ini", "Section", "Hitbox", "") ;NAME ON HITBOX $iMinRefresh = IniRead(@ScriptDir & "\Settings.ini", "Section", "RefreshMinutes", 5) ;HOW MANY MINUTES BETWEEN EVERY CHECK FOR NEW STREAMSUses Livestreamer for playback if available (highly recommended) otherwise opens in your browser. In comparison to similar scripts that I have seen posted here, this takes your username and pulls the people you are already following instead of having you manually entering everyone again, greatly simplifying things. The Twitch and Hitbox API's were largely implemented by glancing at the python-twitch and Hitboxy python libs. For the future, I'm thinking maybe quality-selector, nicer popup instead of traymenu and balloon tip (maybe some sort of toast thing) and SVPtube-like functionality (play link from clipboard) Uses A Non-Strict JSON UDF. Download from Downloads or GitHub (both source and executable available at both locations). Old attachments had 16 downloads.3 points -
One more work-around for the old problem :). Update procedure must be quite different for these two control types under the hood. #include <WindowsConstants.au3> #include <EditConstants.au3> HotKeySet("{ESC}", "_Exit") GUICreate("My GUI") GUISetBkColor(0x00ff00) $c_Label = GUICtrlCreateLabel(0, 10, 10, 200, 20) $c_Input = GUICtrlCreateInput(0, 10, 60, 200, 20, $ES_READONLY, $WS_EX_TRANSPARENT) GUICtrlSetBkColor(-1, 0x00ff00) GUICtrlSetCursor(-1, 2) ; Arrow GUISetState(@SW_SHOW) While 1 GUICtrlSetData($c_Label, TimerInit()) GUICtrlSetData($c_Input, TimerInit()) WEnd Func _Exit() Exit EndFunc ;==>_Exit2 points
-
In my last job and for a number of private projects I needed to port huge amounts of code between languages. I'm specifically talking about ports on one and the same platform. Here are some tips I consider useful (from experience) in no particular order: a) Pre-porting Obviously, create a safe (sandbox) copy of whatever you are about to port. Separate it completely from anything important, even if this means setting up another production environment. b ) While porting Never try to fix something on the flyIf you need to substitute some paradigm (e.g. nested structures) not available in the target language, write a substitute and test it before starting to translateBack up target code on almost every new LOC, use git and write an auto-commit script when in doubtGo on a module by module basis, never translate whole code pages the same timeNever change any variable / constant etc. names on the flyIf time and budget allows, always write test wrappers for longer modules to verify every code path in source and target code (unless dependent on user input, of course)Always assume the code you are porting was written by a person desperately trying to confuse you, even if it was you who wrote it!Some languages have a (or multiple) different array base(s)Don't trust automated translation (I know C#<->VB.NET is tempting) tools, never attempt to create any automated translation toolsRecreate not only code, but also file-structure, even if this is bad practice in the target languageKeep the case-sensitivity of the target and source language in mindDon't delete anything on the way, just comment outYou don't want to care about any best practices or conventions, you care about a 1:1 copy; everything else is post-portingc) Post-porting Create a whole backup of the new code and put it somewhere safe. Then, and only then, start working with a fresh copy of the new code. After all the projects I've been through, I can only say the above also applies when the source (no pun intended) code is only 200 LOC long. If the source language is complex enough, you'd be surprised how bad one can f*ck things up. If you have any additional tips or stories regarding ports, leave them here.2 points
-
Use input control as fake label to avoid flickering on update
jaberwacky and one other reacted to UEZ for a topic
Nice catch KaFu Here an additional one: #include <WindowsConstants.au3> #include <EditConstants.au3> HotKeySet("{ESC}", "_Exit") GUICreate("My GUI", 300, 200, -1, -1, -1, BitOR($WS_EX_LAYERED, $WS_EX_COMPOSITED)) GUISetBkColor(0x00ff00) $c_Label = GUICtrlCreateLabel(0, 10, 10, 200, 20) $c_Input = GUICtrlCreateInput(0, 10, 60, 200, 20) ;, $ES_READONLY, $WS_EX_TRANSPARENT) GUICtrlSetBkColor(-1, 0x00ff00) GUICtrlSetCursor(-1, 2) ; Arrow GUISetState(@SW_SHOW) While 1 GUICtrlSetData($c_Label, TimerInit()) GUICtrlSetData($c_Input, TimerInit()) WEnd Func _Exit() Exit EndFunc ;==>_Exit2 points -
Welcome to the forum. Please start by being more specific. Explain what kind of tool you're trying to automate, what code you have tried to automate it and what exactly goes wrong when you try it. Otherwise we are left to reading tarot cards or pulling horoscopes and both of those are notoriously untrustworthy2 points
-
JSON parse to variables
blackrainbow and one other reacted to SadBunny for a topic
Or, using that UDF you pointed to and it's machine code parser: #include "Json.au3" $jsonString = '{"Brayan":{"id":53192745,"name":"Brayan","profileIconId":636,"age":30,"something":1437402511000}}' $Obj = Json_Decode($jsonString) $age = functionOfMyDreams($Obj, "Brayan", "age") ConsoleWrite("Age: " & $age & @CRLF) Exit Func functionOfMyDreams($decodedObject, $targetObject, $targetKeyInObject) $value = Json_Get($decodedObject, '["' & $targetObject & '"]["' & $targetKeyInObject & '"]') return $value EndFunc ;==>functionOfMyDreams2 points -
AutoIt v3.3.14.0 has been released. Thanks to everyone involved, both visible and behind the scenes. Download it here. Complete list of changes: History Note The Map functionality was disabled in this release as it was not ready. I will release another beta version later with it re-enabled for continued dev and test.1 point
-
Which is AutoItX, but guess you would like to compile an autoit3 script into a DLL. Guess that will not happen. Jos1 point
-
WinHTTP functions
jaberwacky reacted to trancexx for a topic
My outerlect was also useful this time. I know what's the problem. Imgur internally processes your file after the upload (validates, converts to whatever format) and this takes time. After they process the file they make a response. It appears for bigger files they need more than default 30 seconds that WinHTTP waits for server to reply. You can confirm this by yourself by changing/adding line to WinHttp.au3. So, if you want, find function __WinHttpFormSend() and add: _WinHttpSetTimeouts($hRequest, Default, Default, Default, 100000)...line just before: _WinHttpSendRequest($hRequest, Default, $sAddData) If you have slow internet add it like this: WinHttpSetTimeouts($hRequest, Default, Default, 100000, 100000) That will make WinHttp.au3 wait up to 100 seconds before returning.1 point -
Might be of some use >> https://www.autoitscript.com/forum/topic/166704-net-compiled-dll-assembly-in-autoit-the-simple-approach/1 point
-
Host a website
jvanegmond reacted to Xandy for a topic
I used Apache and it was easy enough to get working, however running my big-rig computer 24x7 costs more in power consumption than purchasing webspace.1 point -
Net libraries should be exposed to ActiveX by developer (the person/company who make this desired DLL file, should use ComVisible feature ), regardless of this you should register it with regasm.exe Try to search on forum for "regasm"1 point
-
It was a good read. Seemed like pretty good practices for any code projects.1 point
-
Media will be available i guess but look how long it took before we could get the Win 8 Media (The proper stuff), so it may take a while. trouble is you only have one year for the choice.. I will have 5 machines in the shop to do straight away and then a load of customer requests. But i still maintain for now if your machine is older than 3-4 years maybe not worth the hassle. We shall see.1 point
-
Host a website
jvanegmond reacted to guinness for a topic
Use Dropbox or Google drive then. You could use IIS as instructed by @Jos, but when you say you're going to serve it on Windows XP SP2, I don't think you take security very seriously, so...my advice is use either of those providers and leave it up to them to sort out the "hard stuff". I am being realistic, no one these days "hosts" their own site, since hosting is really cheap.1 point -
1 point
-
Cherenkov, Your initialization of $z is misplaced: it should be inside the first While. That's not any different from Matlab.1 point
-
mmm WinXP, Hope you are not intending to make this webserver internet facing. Just install IIS from the WIndows optional components and you have your websever. https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/iiiisin2.mspx?mfr=true Jos1 point