
bobsyuruncle
Active Members-
Posts
34 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
bobsyuruncle's Achievements

Seeker (1/7)
0
Reputation
-
Koda Help. Can't generate form code for Main Menu
bobsyuruncle replied to bobsyuruncle's topic in AutoIt GUI Help and Support
Not sure why, but I loaded a new koda form and tried again.. it's working now. If anybody happens to stumble across this issue, starting fresh appeared to clear it. -
Kinda lost here Case _Ispressed
bobsyuruncle replied to auth100488's topic in AutoIt GUI Help and Support
Could you use hotkeyset instead? *edit: probably can't use ctrl+c if your objective is to capture the clipboard as it will probably intercept the command. $hMain = GUICreate("",810,75,2475,980, $WS_POPUP, 0x00080028) _WinAPI_SetLayeredWindowAttributes($hMain, 0, 100) Global $labelex = GUICtrlCreateLabel("", 5, 5, 150, 25) Global $labelexvalue = GUICtrlCreateLabel("", 25, 5, 150, 25) Global $labelc = GUICtrlCreateLabel("", 5, 650, 150, 25) Global $labelcvalue = GUICtrlCreateLabel("", 25, 650, 150, 25) Local $try1 Local $try2 ;Local $aAccelKeys[2][2] = [["^c", $try1], ["^n", $try2]] ;GUISetAccelerators($aAccelKeys) GUISetState(@SW_SHOW) HotKeySet("^c", "whatever") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $try1 MsgBox($MB_SYSTEMMODAL, "", "whatever") EndSwitch WEnd Func whatever() ;grab windows clipboard ;do your GUICtrlSetData EndFunc -
Love the Koda tool... been unbelievably usefull for many years. For the first time I attempted to use the 'Main Menu' object (2nd choice in standard tab), but so far I have been unable to actually generate code that includes the Main Menu object. If I double click the MM object on my form it launches the 'Menu Designer' popup where I added some menus and submenus and then closed that popup. If I generate form code, none of my main menu stuff shows up in the generated form. I'm using the latest koda build. Is there some simple step I'm missing for this?
-
bobsyuruncle reacted to a post in a topic: Problem with Pop Up Gui and _GUICtrlRichEdit_Create
-
THANK YOU!!!! I had searched the forums before but did not see the bug post the first scan through. This was in fact a problem with using an older autoit engine (Couldn't be helped in this project). Relevant bug post found here: http://www.autoitscript.com/forum/topic/139788-unexpected-result-in-_guictrlrichedit_create/ Based on the information I found on that bug post I have modified _GUICtrlRichEdit_Create to manually resolve the issue for this project.
-
Thanks, I removed the line "Local $hGui, $hRichEdit, $iMsg" from the script. Same Behavior unfortunately Func Main() $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, 4) & ")", 320, 350, -1, -1) $richgui = $hGui GUISetOnEvent($GUI_EVENT_CLOSE, "Form2_1Close") $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_AppendText($hRichEdit, @CR & "This is more text") GUISetState() EndFunc
-
Thanks for the suggestion. No luck unfortunately: Pasting partial sample showing the modified code. Everything else is same as example in 1st post: Opt("GUIOnEventMode", 1) $Form1_1 = GUICreate("hubconsole", 655, 697) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close") $gethubbutton = GUICtrlCreateButton("Get Hub Info", 501, 129, 81, 25) GUICtrlSetOnEvent(-1, "Main") GUISetState(@SW_SHOW) global $richgui, $hRichEdit Func Form1_1Close() exit EndFunc While 1 Sleep(100) WEnd Func Main() Local $hGui, $hRichEdit, $iMsg $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, 4) & ")", 320, 350, -1, -1) $richgui = $hGui GUISetOnEvent($GUI_EVENT_CLOSE, "Form2_1Close") $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_AppendText($hRichEdit, @CR & "This is more text") GUISetState() EndFunc
-
Good day to the autoit community. I am having an issue with the _GUICtrlRichEdit on a pop-up gui box. I have cobbled a short script together that replicates the issue. Simply run the script and click the button for the pop-up gui with the richedit box. If you close the pop-up gui and re-click the button, the richedit box fails to load on subsequent pop-up gui launches. #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) $Form1_1 = GUICreate("hubconsole", 655, 697) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close") $gethubbutton = GUICtrlCreateButton("Get Info", 501, 129, 81, 25) GUICtrlSetOnEvent(-1, "Main") GUISetState(@SW_SHOW) Func Form1_1Close() exit EndFunc While 1 Sleep(100) WEnd Func Main() Local $hGui, $hRichEdit, $iMsg $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, 4) & ")", 320, 350, -1, -1) global $richgui = $hGui GUISetOnEvent($GUI_EVENT_CLOSE, "Form2_1Close") global $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_AppendText($hRichEdit, @CR & "This is more text") GUISetState() EndFunc Func Form2_1Close() _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes GUIDelete($richgui) EndFunc Some further information from diagnostic: The first cycle around shows no @error's for the deconstructor Form2_1Close().. so the richedit destroy and guidelete both happen. When I click the button for the second launch, I see the pop-up gui has a new HWnd.. example: 1st click (0x00514B6) 2nd click (0x000614B6) on the line " global $hRichEdit = _GUICtrlRichEdit_Create($hGui... " I see value to @error of 1 which isn't detailed in the helpfile of the function, but if I dig into the include I see error 1 gets set when: If Not _WinAPI_IsClassName($hWnd, $_GRE_sRTFClassName) Then Return SetError(1, 0, 0) ; Invalid Window handle for _GUICtrlRichEdit_Create 1st parameter I'm stuck at this point as I can't figure why "_WinAPI_IsClassName($hWnd, $_GRE_sRTFClassName" comes back with a failure on subsequent launches of the popup.
-
IE Simulating onevent actions?
bobsyuruncle replied to bobsyuruncle's topic in AutoIt General Help and Support
hi, Thank you, wow... that is easily 10x better than the jumpled version of that code I was just in the process of debugging. This will save me tons of time, so thank you! I did have a couple followup questions... I love the function, but just wondering how do I grab the spawned window and attach to $oIE? Do I need to search for it, or is there something dynamic from script to grab the id? Second question, while the answer provided works perfectly for my coding project I was still wondering if there is a way to 'push' an event script onto the page or maybe I'm thinking in the wrong direction here and what I'm looking for is an HTTP post? Would that be a way I could send an onevent string to IE perhaps? something like: "onclick="window.open('showHubHealthInfoPopup.xhtml?..." except as an event it would be without the onclick. If your not sure that's fine, the answer provided resolves my issue, I'm just trying to understand how dynamically I can make autoit scripts interact with this portal. I searched the forums, but I didn't find much on this. Thanks again for the example! -
Hi, I'm working on an app that data gathers troubleshooting diagnostic information on a private portal. On the page I'm working on now there's one form with a search and a large table of results. Each item has an "information" link that downloads additional information. Each one of those "information" links has .innerHTML source that looks like <TD><A onclick="window.open('showHubHealthInfoPopup.xhtml?hubHealthInfoId=55555', 'popupWindowName', 'dependent=yes, menubar=no, toolbar=no'); return false;" href="#">Information</A></TD> My question is... Is there a way to directly simulate the onclick action by passing the innerHTML in some way? Say for example if there were a function or way to pass the event action directly into the session without the click: _ieAction("window.open('showHubHealthInfoPopup.xhtml?hubHealthInfoId=55555', 'popupWindowName', 'dependent=yes, menubar=no, toolbar=no'); return false;") I can use other methods to search for the "information" links I need and doing a click action with the ie.au3 functions, but if there was a way to directly send the event action I could just alter the hubHealthInfoId= and submit the event directly. Thanks in advance and sorry if that was poorly phrased.
-
Hello, Getting "File is deleted" from download link. Did this project die? Thanks, Bob
-
Thank you. This worked and was cleaner than what I was trying.
-
Hey guys... not a vital issue or anything, but I've setup the format of date and time in a user input field (code included below), but the output is off on the second field and I can't figure where it's getting it from.... the code displayed is the only place in the program that modifies these fields: $StartDate = GUICtrlCreateDate(@Year&"/"&@MON&"/"&@MDAY&" "&@HOUR&":00", 8, 112, 138, 21) ; to select a specific default format $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd HH:mm" GUICtrlSendMsg($StartDate, $DTM_SETFORMAT_, 0, $style) $EndDate = GUICtrlCreateDate(@Year&"/"&@MON&"/"&@MDAY+1&" "&@HOUR&":00", 8, 152, 138, 21) $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd HH:mm" GUICtrlSendMsg($EndDate, $DTM_SETFORMAT_, 0, $style) The outputs are: Startdate: 2014/04/04 17:00 (good so far) EndDate: 2014/04/05 07:25 (Where did 07:25 come from? FYI 25 is the current Minute time of the test, but the 07Hour is not. Current hour is 17:00) Both fields have almost exactly the same code and syntax with endDate being incrimented by 1. Nowhere else in my script am I making any modifications to either field, just read. Thanks for your help
-
Thanks for the tips gents. Both solutions should work fine for anybody, but I'm going to mark mikell for solved. I've never worked with regex but I can see now I should spend some time with it for this kind of project.
- 7 replies
-
- stringsplit
- comma
-
(and 2 more)
Tagged with: