Graeme Posted February 11, 2014 Share Posted February 11, 2014 I started programming in Nov with a script developed by a previous colleague. Today I updated the AutoIt compiler (because I accidently deleted Include files) and now nothing will compile! I mean it compiles but doesn't produce the same icon which I found odd and then when I ran it, it came up with an error in something I never touched! How can I find the problem? I looked at the list of potential script breaking variables and found none of them. Could I go back to the earlier version of AutoIT? Blessings Any help really appreciated. Graeme Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 11, 2014 Moderators Share Posted February 11, 2014 Graeme,The new version of AutoIt does not provide a default icon - you now need a #pragma directive to define the one you wish to use. So look at pragma in the Help file to see what to do. As to "when I ran it, it came up with an error", I am afraid my crystal ball is at the cleaners and so I am unable to help. If you were to provide the content of the SciTE console showing the error message we might be able to offer some help. M23 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 Link to comment Share on other sites More sharing options...
Graeme Posted February 12, 2014 Author Share Posted February 12, 2014 Hi Melba, Thanks for your response. That is very helpful - though the icon is a minor issue I'll be glad to see it sorted. The error message is to do with this piece of script though of course the actual problem could come from something earlier... Func MonitorOpenVPNTunnel ($UDPLogReceiver) If $UDPLogReceiver[0] <> 0 Then $received = UDPRecv($UDPLogReceiver,16000) If @error And (@error <> 10040) Then InternalErrorMsgBox("UDPRecv",@error) The UDPRecv function has produced an error (-1) and I wonder if those with more experience than me might know what I could look for. I think this means an socket didn't work but I haven't touched the sockets so all I can think of is that the program is handling the sockets differently because of the compiler being different.. How? Actually I was hoping that people who are using AutoIt much more than me and have used it for longer would have a better idea how to handle this sort of problem.. Not looking for any crystal ball gazing but just wanting to benefit from the experience of others rather than reinventing the wheel. Actually the funny thing about the SciTE Console is that it didn't crash the program, but because this is a monitoring function, the one above, the program kept coming back to the same error message (InternalErrorMsgBox) and I had to stop the program with TaskManager the hard way. Blessings Graeme Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2014 Moderators Share Posted February 12, 2014 (edited) Graeme,Sorry, I know nothing about the UDP functions. I suggest you open a new thread with "UDP" in the title to attract those who do. M23 Edited February 12, 2014 by Melba23 Typo 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 Link to comment Share on other sites More sharing options...
jaberwacky Posted February 12, 2014 Share Posted February 12, 2014 I don't know anything about UDP either, but I did see this at MSDN. Make a call to WSAGetLastError to get an error code. Then use this page to give you some more information to go on: http://msdn.microsoft.com/en-us/library/ms740668.aspx Anyways, hope that does something! Func MonitorOpenVPNTunnel ($UDPLogReceiver) If $UDPLogReceiver[0] <> 0 Then $received = UDPRecv($UDPLogReceiver,16000) If @error And (@error <> 10040) Then InternalErrorMsgBox("UDPRecv", @error) ConsoleWrite(DllCall("Ws2_32.dll", "int", "WSAGetLastError")[0] & @CRLF) Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Graeme Posted February 12, 2014 Author Share Posted February 12, 2014 Just like I thought, there is more to this than meets the eye. Also, once I commented out the UDP function I realise the iniread has failed. Can I please go back to the older version of AutoIt? I can't read through 4000 lines of script to try and sort out what has happened. Has anyone else had this sort of problem with the new version of AutoIt? Blessings Graeme Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2014 Moderators Share Posted February 12, 2014 Graeme,I can't read through 4000 lines of script to try and sort out what has happenedWhy not? Do you want the script to work or not? Go and read the changelog in the Help file to see what changed and then try to isolate those parts of the script which are affected by those changes - you will probably be surprised how few of those 4000 lines need to be looked at in the end. M23 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 Link to comment Share on other sites More sharing options...
water Posted February 12, 2014 Share Posted February 12, 2014 I don't hink IniRead has changed. Without having seen your code I suspect that you do not have too much error checking in your code. For scripts you run in production you need to make sure that no possible error goes unnoticed. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Graeme Posted February 12, 2014 Author Share Posted February 12, 2014 Thanks Melba, But to be honest I looked at the change log and couldn't really understand what had changed. For someone that's been writing AutoIt script for a while this may seem easy but I only just started. 99% of the 4000 lines were written by someone else who knows a lot more about computers. Blessings Graeme Link to comment Share on other sites More sharing options...
Graeme Posted February 12, 2014 Author Share Posted February 12, 2014 Thanks Water but if you saw the whole script you'd see a lot of error checking! Blessings Graeme Link to comment Share on other sites More sharing options...
water Posted February 12, 2014 Share Posted February 12, 2014 But why should IniRead fail? What's the return value of IniRead? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 12, 2014 Moderators Share Posted February 12, 2014 You state you only just started coding with AutoIt, you don't understand what has changed, you want us to assist, but you won't post your code in its entirety so we can help. Do you see where the disconnect is? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Solution BrewManNH Posted February 12, 2014 Solution Share Posted February 12, 2014 Can I please go back to the older version of AutoIt? http://www.autoitscript.com/autoit3/files/archive/autoit/ Pick whichever previous version of AutoIt you'd like. Graeme 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Graeme Posted February 12, 2014 Author Share Posted February 12, 2014 Dear all, Thanks for all your comments. Water - I must be more precise. IniRead didn't fail as in produce an error - it just didn't change the variables as expected and now I know why - I was trying a new way of testing my script - using F5. What I have now realised is that this means that it was running in a different place as I had previously moved the exe file after each compliation (too long to explain why) and so the program didn't find the ini file. That's why the values didn't change! Problem solved:) This is what happens when you change your work process.. Thank you JLogan for the offer but I don't think if I had posted the 4000+ lines of code you would have had the time to read and understand it all. I didn't want that kind of help but rather a pointer in how to find the error, what the recent changes to AutoIt might mean in the UDP area. As I said I started with a script developed by a past colleague. Maybe this is a bad way to start but it was going well.. BrewMan - wonderful. I'll try that approach though I suppose I should really figure out what the change log means for the script I'm working on so that in the future this won't happen again. Blessings Graeme Link to comment Share on other sites More sharing options...
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