berkal Posted March 19, 2013 Share Posted March 19, 2013 (edited) I have a grid in a window as shown highlighted below. I have also displayed the "Window Info" for the control below. My question is how do I replace any text/value such as "$9.95" with "$6.95" the second they appear in the grid. The software I am using is a POS for a pizza store. When staff member enters "BM", the software automatically fills in the Description and Price, however I'd like to change the price but the software doesn't allow it. The problem is that AutoIt cannot access the API for grid controls because they are custom to their compilers and not standard Windows APIs. I don't know the solution, but is it possible to search the screen or grid for the text "$9.95" and select the coordinate where it is located then replace the selection with "$6.95"?Thanks in advance,Berkal Edited March 19, 2013 by berkal Link to comment Share on other sites More sharing options...
JohnOne Posted March 19, 2013 Share Posted March 19, 2013 To be honest. a rag tag hacky script like the one you suggest is hardly the way to go for a commercial software. If it were me, I'd seriously think about contacting the developer, or creating a whole new program. But before that, how certain are you that these controls cannot be accessed? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
berkal Posted March 19, 2013 Author Share Posted March 19, 2013 The developer who created the software has retired and the cost to replace this software far out weights the price to make a hack. Link to comment Share on other sites More sharing options...
JohnOne Posted March 19, 2013 Share Posted March 19, 2013 That's one issue out of the way then. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 19, 2013 Moderators Share Posted March 19, 2013 (edited) berkal, A question: Can you manually change the price value in that control? Because if you cannot do it manually, I doubt very much whether you are going to be able to do it programmatically with AutoIt given that it is not a standard API control. M23 Edit: Another thought: Surely the original developer did not hard-code all the items and prices into the app - so is there not a file somewhere which links item and price which you can modify? That would be the best solution. Edited March 19, 2013 by Melba23 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...
iamtheky Posted March 19, 2013 Share Posted March 19, 2013 it looks like items like 'Discount' have keyboard shortcuts built in, can you just send ALT+N then send 30% as the discount to get from $9.95 to $6.97? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
berkal Posted March 19, 2013 Author Share Posted March 19, 2013 berkal,A question: Can you manually change the price value in that control? Because if you cannot do it manually, I doubt very much whether you are going to be able to do it programmatically with AutoIt given that it is not a standard API control. M23Edit: Another thought: Surely the original developer did not hard-code all the items and prices into the app - so is there not a file somewhere which links item and price which you can modify? That would be the best solution. Yes you can change the prices manually. You can change the price in the admin section. However every Tuesdays we have a special where we sell our pizzas for $6.95 and there is no feature to automatically change the prices on this date.Note: I want any of the prices $7.95, $8.95 & $9.95 to automatically change to $6.95 only on Tuesdays. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 19, 2013 Moderators Share Posted March 19, 2013 berkal,You can change the price in the admin sectionI take it this is the "admin" section of the POS software. Where does this price change get stored? It must be somewhere on the system. Modifying that storage (or at least replacign it with a new version on Tuesdays) seems like a better bet to me that trying to play around with the GUI itself. But let us continue on parallel tracks. Is the main GUI you posted above resizeable or of a fixed size? If it is resizeable, does the font size of the item/price change when it is resized? That will determine how we might look for the various sections of the grid text. I have done something similar in the past for an old DOS app where we needed to identify certain parts of the screen display - I am sure we can manage the same trick here. But I would still look to changing the data source first if possible. That is a far more elegant solution - and a lot less code! 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...
berkal Posted March 19, 2013 Author Share Posted March 19, 2013 berkal,I take it this is the "admin" section of the POS software. Where does this price change get stored? It must be somewhere on the system. Modifying that storage (or at least replacign it with a new version on Tuesdays) seems like a better bet to me that trying to play around with the GUI itself. But let us continue on parallel tracks. Is the main GUI you posted above resizeable or of a fixed size? If it is resizeable, does the font size of the item/price change when it is resized? That will determine how we might look for the various sections of the grid text. I have done something similar in the past for an old DOS app where we needed to identify certain parts of the screen display - I am sure we can manage the same trick here. But I would still look to changing the data source first if possible. That is a far more elegant solution - and a lot less code! M23 Thank you for the speedy reply. I have attempted to modified the data source with no luck. The GUI is fixed and can not be resized. The font is always one size. Link to comment Share on other sites More sharing options...
JohnOne Posted March 19, 2013 Share Posted March 19, 2013 It could also be that the library the gui was built with, has an interface library too. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 19, 2013 Moderators Share Posted March 19, 2013 berkal,I have attempted to modified the data source with no luckBut have you tried replacing the data source with another which holds different pricing data - that should surely just be a case of renaming/copying a couple of files? The POS app must do something like that when you update the prices. What sort of form does this data source have? Can you post an example? I will have a play with your screen shot and see what I can do to locate the various areas - but I am still convinced that the data source is the way to go here. 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...
berkal Posted March 20, 2013 Author Share Posted March 20, 2013 http://dl.dropbox.com/u/37233183/EFO.rar I could not be 100% sure which file is the data source file, so I've upload the entire POS directory to dropbox. The total size is about 30MB. You may have a better idea as to what file it may be. I really appreciate your efforts. Link to comment Share on other sites More sharing options...
BrewManNH Posted March 20, 2013 Share Posted March 20, 2013 You should alter the data and save it, then see which files have different modified dates. Currently, none of those files have been modified in nearly 2 years. There's also an encrypted database file "efo.mdw" that might hold the information you're looking for. 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...
berkal Posted March 20, 2013 Author Share Posted March 20, 2013 Thanks BrewManNH. I'll try to read and modify the data found in the "efo.mdw" file. Link to comment Share on other sites More sharing options...
JohnOne Posted March 20, 2013 Share Posted March 20, 2013 It might be easy to do that so long as you know the encryption type and have any associated keys. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 20, 2013 Moderators Share Posted March 20, 2013 berkal, I agree with BrewManNH - change the price of the item and see which files change. As long as you can identify the files that are affected it will be simple to swap the different versions depending on the day. 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...
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