Leaderboard
Popular Content
Showing content with the highest reputation on 07/22/2015 in all areas
-
It's pointer to safearray of pointers. "ptr"2 points
-
I think could be a Pointer to SAFEARRAY. Saludos2 points
-
Problem with Do loop
Rockerfeller and one other reacted to JohnOne for a topic
If you have a lot of that in your code, just make a little function to help. Do $Input = InputBox("title", "prompt") Until _StringIs($Input, "Sub|Super|Ultra") Func _StringIs($String, $SubString) If Not StringInStr($SubString, "|") Then Return ($String == $SubString) EndIf $aStrings = StringSplit($SubString, "|", 2) For $i = 0 To UBound($aStrings) - 1 If $String == $aStrings[$i] Then Return True EndIf Next Return False EndFunc2 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 ;==>_Exit1 point
-
With the imminent public release of Windows 10 I have been readying my test environments to be able to deploy and test Windows 10. This is a quick overview of the main deployment scenarios supported and some links to thesoftware you will need. Also I’ve included some links to a selection of videos from the MS Ignite conference that I found the most useful for someone new to Windows 10 deployment. Deployment Scenarios The main deployment scenarios are:Wipe and LoadIn-place UpgradeProvisioning Wipe and LoadThis is the traditional process and follows these general stages:Wipe deviceDeploy customised OS imageInject driversInstall applicationsOptionally this can include steps to capture and restore user data and/or settings if present on the device (usually laptops). Wipe and Load can be done with both MDT and ConfigMgr. ProsDevice will be in a known new stateRemoves any remnants of old installations, updates and obsolete applications. Over months and years performance and disk space can be adversely affectedCan use a custom image that could be pre-updated, or contain applications that rarely change - this can drastically improve deployment timesConsCan have a longer deployment time due to re-installation of all applications post-deploymentMust have driver packages available for all machine variantsCreating scripts to capture and restore user data can be time-consuming In-place UpgradeThis is a newer scenario available for clients running Windows 7/8/8.1. Windows setup does most of the work for you:Save existing user data, settings, applications and driversDeploy original Windows 10 imageRestore everythingThis is a new scenario introduced with Windows 8.1 and Windows 10 and it will be interesting to see how it works in anger. In the Microsoft presentations I’ve seen this is being advertised as the preferred method for upgrading from Windows 7 and 8. I personally prefer a wipe-and-load so that I know everything is clean. Also, new OS deployment is often used as an good opportunity to upgrade major software like Microsoft Office which makes some of the in-place upgrade benefits redundant.One scenario I think may benefit is the ability to get a Windows client from an OEM and easily upgrade it to Windows 10 while keeping all the drivers it has. Getting the driver packages for new machines was a burden for some smaller companies. ProsPreserves all data: user data, setting, applications and drivers and therefore is potentially less riskyDon’t always require new drivers if existing drivers are compatibleOften a shorter deployment timeRequires less preparationConsCannot use a customised image, the original Windows 10 media must be usedIf a machine had obsolete installations and settings these will remain Provisioning This is another new Enterprise-focused scenario designed to help with the situations where a company wants to ship a new Windows 10 machine directly from the OEM to a user and then have enterprise software and policies applied to that machine to bring it into compliance.This is controlled by a provisioning package (.ppkg) that is obtained and executed on the target machine and can perform the following operations:Change Windows 10 version from Pro to Enterprise and add in Enterprise features, updates and language packsRetains drivers and applicationsInstall or remove Modern UI applications Enrol into a domain or management solutionProvisioning packages are created with the new Windows Image and Configuration Designer (Windows ICD) tool. ProsCan change Windows from Pro to Enterprise - this previously required a wipe-and-loadEnables Bring Your Own Device (BYOD) scenariosCons The available policies are a small - but useful - subset of those available in Group PolicyYet another tool to go into the toolkit along with WinPE, WIMs, MDT, ConfigMgr. Many organisations already struggle with the best way to deploy and now we have a choice of bespoke vs MDT vs ConfigMgr vs MDM vs Windows ICDFor remote installations, you need a delivery mechanism and the .ppkg files involved may be largeThe only applications that can be installed are Modern UI applications. PowerShell scripts and Win32 applications are in the long-term plan. Deployment Tools and KitsHere are links to the toolkits you need for MDT and ConfigMgr to deploy Windows 10. Many are in beta or RC stage - I’ll update the links when the final versions are publicly available.MDT 2013 Update 1 Preview (Windows 10 support)ConfigMgr 2012 Service Pack 2 (Windows 10 support. Ignore the evaluation part. This applies for both 2012 and 2012 R2)Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 Update (Windows 8.1 WinPE is used in ConfigMgr 2012 for deployment and works fine for Windows 10)Windows Assessment and Deployment Kit (Windows ADK) for Windows 10 Preview (Contains the Windows ICD) VideosHere are a selection of videos from the MS Ignite conference in May 2015 that I found the most useful:What’s new in Windows 10 DeploymentWhat’s new with ConfigMgr OSD and MDTDeploying Windows 10: Back to BasicsUpgrading to Windows 10 in DepthTroubleshooting Windows 10 Deployment: Top 10 Tips and Tricks1 point
-
WinHTTP functions
jaberwacky reacted to jchd for a topic
http://www.songtexte.com/songtext/news-from-babel/banknote-5bc03b00.html1 point -
WinHTTP functions
mLipok reacted to jaberwacky for a topic
Nah, it's not silly. Your english level is great. Now if I could ever just get up on your autoit level then that would be something.1 point -
WinHTTP functions
jaberwacky reacted to trancexx for a topic
I don't get that last sentence. What does it mean? Just add errors checks and missing function: Func _imgur_uploadur(Const $image_file) Local $hFile = FileOpen($image_file, 16) Local $bData = FileRead($hFile) FileClose($hFile) Local Const $sClientID = "3fda9b4a8bc150c" ; your client-id Local Const $hOpen = _WinHttpOpen() _WinHttpSetTimeouts($hOpen, 10000, 60000, 90000, 90000) ; see, you can do it here too Local Const $hConnect = _WinHttpConnect($hOpen, "https://api.imgur.com") Local $sReceivedData = _WinHttpSimpleSSLRequest($hConnect, "POST", "/3/upload.xml", Default, "image=" & Base64Encode($bData), "Content-Type: application/x-www-form-urlencoded" & @CRLF & "Authorization: Client-ID " & $sClientID) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) Return $sReceivedData EndFuncThat's the same thing as that VB example that you showed as far as HTTP goes.1 point -
AutoIt Error
PoneToungthar reacted to Jos for a topic
Doubt you ran our exe2aut.exe to retrieve the source but show us the scriptcode and explain the error you have. Oh: by the way, also read our forum rules in relation to decompilation topics to ensure you stick within these rules. Jos1 point -
AutoIt Error
PoneToungthar reacted to AutoBert for a topic
Use the same AutoIt-Version you used to compile the script.1 point -
New SciTE4AutoIt3 available with the updated SciTE v3.5.4 release.
jaberwacky reacted to Jos for a topic
Thanks for the report. Please try the current beta version to see if that also fixes it for you. 15.503.1200.3: Fixed regression with Commentblocks leaving the #CE causing an au3check warning.Jos1 point -
Script for pressing button
deathcurse reacted to JLogan3o13 for a topic
Hi, deathcurse. Glad you read through the tutorials, but what you missed were the forum rules, especially the part about no game automation. Please read through them now, and you'll see why you won't get any help with this question. See you soon with a legitimate question hopefully.1 point -
MSDN Says. The VARIANT_BOOL type specifies Boolean values. This type is declared as follows: typedef short VARIANT_BOOL; Saludos1 point
-
Open all files in a folder at once
Rockerfeller reacted to ViciousXUSMC for a topic
Try adding $bReturnPath = True to _FileListToArray() so that you will be sending the full file path to the ShellExecute() rather than just the file name. Else the script needs to be in the same directory as those files. Local $array = _FileListToArray("path\to\folder\", "*.xls", 1, True) For $i = 1 To $array[0] ShellExecute($array[$i]) Next Based on the fact you're working with Excel you may find it very handy to look at Waters Excel UDF, also I work with Excel and incorporate currently selected text into functions via hotkeys so I can say have a computer name selected in a cell and press Ctrl+Shift+A to instantly go into that computers Admin Share by taking a Copy to clipboard and pasting the clipboard into my function. Edit: Your code is not going to work as a .bat this is not Windows Scripting, this is AutoIT so you need to install AutoIT and save this code into a .au3 file or compile it from a computer with AutoIT and run it on another computer as a .exe1 point -
Can i use UDFs in VB.Net ?
kcvinu reacted to AdmiralAlkex for a topic
You can with AutoItObject. Look at post #202 and Access AutoIt thread for examples.1 point -
1 point
-
Open all files in a folder at once
Rockerfeller reacted to JohnOne for a topic
Something like this... Local $array = _FileListToArray("path\to\folder\", "*.xls", 1) For $i = 1 To $array[0] ShellExecute($array[$i]) Next1 point -
So you want to port code from one language to another, huh?
minxomat reacted to jvanegmond for a topic
If you're not proficient in both languages, you're going to have a bad time. Even simple things like data types can be different in closely related languages. Maximum value of a char in C++ is 0xFF, but in C# it is 0xFFFF. The correct way to translate is to use a byte in C#, which has a maximum value of 0xFF. These are closely related languages. Good luck handling overflows and "bitfucking" in other languages.1 point -
The idea is that you use the VB.NET to make build your program and use some of AUtoit's functionality via the AutoItX option. Jos1 point
-
Use input control as fake label to avoid flickering on update
jaberwacky 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 ;==>_Exit1 point -
I only heavily comment code if what I'm writing can't be figured out by the average coder. I may put a small snippet of comments in the code if it's for myself. Generally, if you need to over comment your code so you're able to follow it 6 months later, you're writing bad code. As for punctuation in the comments, I may put them if I think of it, otherwise who really cares if you put a period at the end of it?1 point
-
GUICtrlCreatePic() use only once at begin then use ONLY GUICtrlSetImage() if you encounter refresh problems then use manual refresh instead by SplashImageOn() by: $gui = GUICreate(...) $pic = GUICtrlCreatePic(...) $pic_hWnd = ControlGetHandle($gui,"",$pic) DLLCall("user32.dll","int","InvalidateRect","hwnd",$pic_hWnd,"int",0,"int",0)1 point