
P388l3s
Members-
Posts
14 -
Joined
-
Last visited
Everything posted by P388l3s
-
JSON UDF Library (fully RFC4627-compliant)
P388l3s replied to Gabriel13's topic in AutoIt Example Scripts
Thanks, a project I'm working spits out JSON formatted files, hopefully I'll be able to use your UDf to make working with these files easier. I like easier! I tip my hat to you. -
Populating FileOpenDialog with Drag & Drop
P388l3s replied to QA Stooge's topic in AutoIt General Help and Support
here's some code I've been working on for a similar app here at work, I've tidied it up a bit and left a great big pointer to where to put your code. #include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> Opt ( 'GUIOnEventMode', 1 ) Opt ( 'TrayOnEventMode',1 ) Opt ( 'TrayMenuMode', 3 ) TraySetClick ( 8 ) $Gui = GUICreate ( 'Drag Drop', 75, 30, -1, -1, -1, $WS_EX_ACCEPTFILES + $WS_EX_TOOLWINDOW ); + $WS_EX_APPWINDOW $GRP = GUICtrlCreateGroup ( 'Drop File', 2, 2, 71, 26 ) GUICtrlSetState ( $GRP, $GUI_DROPACCEPTED ) $TrayExit = TrayCreateItem ( 'Exit' ) TrayItemSetOnEvent ( $TrayExit, 'ExitEvent' ) GUISetState ( @SW_SHOW, $Gui ) Func _BringToFront ( ) If Not WinActive ( $Gui ) Then WinActivate ( $Gui ) EndIf EndFunc Func _GUI ( ) TraySetOnEvent ( $TRAY_EVENT_PRIMARYDOWN, '_BringToFront' ) GUISetOnEvent ( $GUI_EVENT_CLOSE, "SpecialEvents" ) GUISetOnEvent ( $GUI_EVENT_MINIMIZE, "SpecialEvents" ) GUISetOnEvent ( $GUI_EVENT_RESTORE, "SpecialEvents" ) GUISetOnEvent ( $GUI_EVENT_DROPPED, '_dropped' ) While 1 Sleep ( 10 ) WEnd EndFunc Func SpecialEvents ( ) Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE ExitEvent ( ) EndSelect EndFunc ;==>SpecialEvents Func ExitEvent ( ) Exit EndFunc Func _dropped ( ) ;@GUI_DRAGID, @GUI_DRAGFILE and @GUI_DROPID ;MsgBox ( 4096 + 64, 'Output', @GUI_DRAGFILE ) If FileExists ( @GUI_DRAGFILE ) Then #cs YOUR CODE GOES HERE!!! #ce Else ;Redundant test. EndIf EndFunc _GUI ( ) Just remember @GUI_DRAGFILE is your actual filename to work with. If you left click the tray icon it brings the window to the front, a right click gives you a menu (exit only) and you should be set from there. Hope this helps. Pebbles. -
Blind Installs on Domain workstations.
P388l3s replied to Nezoic's topic in AutoIt General Help and Support
Application installs without the use of a logged on user are possible... Depending on the installer type, such as .MSI or install shield, nsis etc. What you can do is create answer files for things like nsis, install shield and even .MSI if you have the tools. For Example if your installer is an install shield then instead of running the setup.exe run it from the commandline like so: C:\someprogram\setup.exe -R (or create a shortcut and add the -R) The capitaliztion of the R is intended!!!. install the program as you normally would, once the install is complete, go to the machines Windows dir and find the file setup.iss, copy this to your program folder ie C:\someprogram\setup.iss, now any machine that needs this software installed can use the following code instead: C:\someprogram\setup.exe -s I use these exact same steps all the time, I have only come across a few apps that will not work this way, usually they require special license keys that I can't enter into the registry first, or have broken installers that don't write the setup.iss or other answer files correctly. .MSI's are a little more complicated as MS relies on the package maintainer to support the silent switches, and hasn't really released official .MSI Transform tools for people to use (you can get a transform tool from their SDK but it's woefully inadequate). For more information on silent install switches and automated installs you really should look at msfn.org they have tons of documentation on the subject, I've been a member there for years. Hope this helps. Pebbles -
Nice tools, I've been doing this same thing but using the command line from my scripts, this may just make my scripts a little cleaner. Thanks
-
_INetSmtpMail Mail failed with error code 50?
P388l3s replied to n9mfk9's topic in AutoIt General Help and Support
Sorry to bring an old thread up again, but I just found an answer to this particular problem, for exchange at least: _INetSmtpMail ( $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress [,$s_Subject [,$as_Body [,$s_helo, [,$s_first [,$b_trace]]]]]) set $s_first to -1 IE $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1) for exchange 2007 this solved my error 50 problem. hope this helps someone. -
OK, Just tried this too, Copied _ZipPlugin.au3 to the correct directory, (include\user), have the dll in the script directory that I'm creating, compile my script and get error _ZipCreate unknown function, I opened the _ZipPlugin.au3 and it doesn't contain a function called _ZipCreate. it looks like the functions have been deleted from the file. Pebbles
-
Script won't run in specified directory
P388l3s replied to 2tim3_16's topic in AutoIt General Help and Support
Have you thought about doing this slightly differently? maybe along the lines of: keep the password in a file on the server (use _StringEncrypt to encrypt the password) Then in your scripts have a function that retrieves the password from the server and decrypts on the fly, it would still be insecure insomuch as you would have a password in your script to do the string un-encrypt but you could workaround that too(#1). This would obviously negate the need to constantly change your scripts and have your password kept in cleartext in a thousand places that could potentially be a security threat. I'm actually planning on working on something like this myself, but it'll be a while as I just started with a new employer. Pebbles #1 - depending on what you have your scripts do, if they are scheduled scripts then you could compile the scripts with obfuscation and make them non decompile-able, this would add to the overall security, while simplifying your need to change the main password i ALL your scripts. If they are tools used by your techs then you could design it to use a username password type feature before doing the read and decrypt of the password. -
A question about user created functions...
P388l3s replied to P388l3s's topic in AutoIt General Help and Support
Thanks, yes I know what it is (Recursion, but the word eluded me) but it's been a VERY long time since my days at School/College doing programming and to be honest it's not my best suit, but here I am with an itch that needs scratching and so I'm scratching away, but as for the question, I thought I'd ask before slamming my forehead against the wall. As for the array, I'm not using the array itself in the function just data extracted from the array, although I may need to create arrays within the function to deal with some of the recursion branches, I'm basically inquiring to find if the language is powerful enough to handle such events, an honest question I believe. Pebbles -
A question about user created functions...
P388l3s posted a topic in AutoIt General Help and Support
Hi I've been lurking on this board for a long time, enjoy the community thats grown up around AutoIT, and this script language is just what the doctor ordered, but to business... I'm working on a script that uses an array built from a INI using the section names, and then processes those sections one at a time and makes some changes, but the script I'm writing is only really going to work nicely if I can call the function from within itself, thereby creating a cascade effect to sort the changes correctly, I have knowledge and programming experience (although a programmer I do not think I am ) I know this type of thing is possible with C C# and I think Cobol can handle it too, just wondered if anyone here has tried something like this or if any of the Devs or Moderators know if AutoIt can handle a situation like this? Thanks for your time, and keep up with the great work, this script language is excelent. Pebbles -
Realvnc Install Script Problem
P388l3s replied to Athlon1000's topic in AutoIt General Help and Support
ignore my post, it seems i have since changed my ways! -
Realvnc Install Script Problem
P388l3s replied to Athlon1000's topic in AutoIt General Help and Support
Sry to dredge up an old thread but i saw this today and know the answer... what everyone missed from your posted picture was that the Title of the window had changed slightly and you had not taken into account the change also. WinWaitActive("Setup - VNC", "Setup is now ready to begin installing VNC on your computer.", 3000) should have been "Setup - VNC " note the space after C this would have solved the exact problem you were having! Pebbles -
I know that uTorrent is also packed with UPX maybe it's an incompatibility with 2 UPX's running together, just guessing
-
Running SciTE as a different user
P388l3s replied to j'tje's topic in AutoIt General Help and Support
Using a fairly standard windows installer package will give you the ability to change permissions on the folder structure and the registry, IE WISE, INSTALLSHEILD, both give you this ability, i haven't played with the free installer apps to know if they also provide this ability, but i have just in the last couple of days started playing with SETACL using Autoit and it does exactly what you want it to with both File/Folder/Registry permission's. Maybe the writers of NSIS or the other open installer apps should look into SETACL for inclusion in their products. P388l3s -
How about TUGZip that has a clean front-end and does all the major Archive formats, plus it's free. Also if you read from the top the poster actually said it was a pretty pointless script but was something he wanted to try to get his fingers wet at coding, so in that vein, good job. P388l3s EDIT: Fat Fingers strike again!