lingo124 Posted May 21, 2013 Share Posted May 21, 2013 (edited) I have Notepad and am running 1 copy of Notepad in sandboxie and 1 copy of the program by itself. Sandboxie appends its [#] thing to the title. e.g Regular Program title: Notepad Sandboxie Program title: [#] Notepad [#] When I try to use wingetpos() on the first title, it works fine. But when I try to use wingetpos() on the sandboxie title, nothing is returned. However, if I set the sandboxie program to display the original program title, it can find the position just fine. But then I can only get the position of one of the windows because they share the same name and wingetpos() only gets the most recently active window. I thought it might have to do with escaping characters, so I tried escaping the brackets with "", and then I tried escaping the pound signs. Neither worked. It would always return an error saying subscript used with nonvariable array. My code: Global $windowinfo, $windowinfos $windowinfo = WinGetPos("Notepad ") $x = $windowinfo[0] $y = $windowinfo[1] $windowinfos = WinGetPos("[#] Notepad [#]") $xs = $windowinfos[0] $ys = $windowinfos[1] I need the window positions to calculate the locations of text boxes and words within the program. This program is not used for 1)malware 2)bypassing security measures 3)automation contrary to EULA 4)launching games 5)running or injecting code 6)decompilaton of anything 7)a non-exhaustive list of anything else It is not 1)pornographic 2)explicit 3)express anti societal ideas 4)copyrighted material It is NOT the same question as posted before because now it is interacting with Notepad so I can enter data and save it using 2 different instances. Other than that thanks for any help! Edited May 21, 2013 by Melba23 Reduced font size Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 21, 2013 Moderators Share Posted May 21, 2013 lingo124, You obviously missed this bit: "Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above" Please do not try a third time. 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