Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/16/2017 in all areas

  1. You may also want to review this -- https://www.slipstick.com/developer/change-programmatic-access-options/
    1 point
  2. Can you show us your Programmatic Access settings, which are found under Options > Trust Center > Trust Center Settings > Programmatic Access?
    1 point
  3. I am not sure of the complete plan here... But this works... #include <Array.au3> Local $aArray_Base[10][3] For $i = 0 To 9 For $j = 0 To 2 $aArray_Base[$i][$j] = $i & " - " & $j Next Next _ArrayDisplay($aArray_Base, "2D - Original") ; Insert single item in defined column $aArray = $aArray_Base $aArray[0][2] = "True" ;_ArrayInsert($aArray, 0, "True", 2) ; <- I want to add this data to Row 0, Column 3 but retain the data in Columns_ and 1. _ArrayDisplay($aArray);, "2D - Defined column") 8)
    1 point
  4. mikell

    Date Between Two Dates

    #include <date.au3> MsgBox(0, "Check if between", _dateIsBetween(_NowCalc(), "2017/01/01", "2017/12/31")) ; are we in 2017 Func _dateIsBetween($sDate0, $sDate1, $sDate2) Local $date0 = StringReplace($sDate0, "/", ""), $date1 = StringReplace($sDate1, "/", ""), $date2 = StringReplace($sDate2, "/", "") Return (($date0 >= $date1) And ($date0 <= $date2)) ? "yes" : "nope" EndFunc ;==>_dateIsBetween
    1 point
  5. Access 2007 stopped to open the database (file .mdb 500Mg). Maybe it has something to do with the problems encountered with the hard drive? Anyway I get this error: "During the last opened document *** caused a serious error. Continue its opening?" I click Confirm and get the next message: "Requires database restore ...". I confirm it, and then begins the process of recovery and after a while gives a message that : "Microsoft Office Access - an error is detected. The application will be closed. ..." Any help! Is there some manuals or tools to fix this error?
    1 point
  6. You're welcome ... and my last post was merely a tongue-in-cheek remark... also towards myself not checking earlier. Jos
    1 point
  7. Hi Guys! Again, it´s update time! ISN AutoIt Studio verson 1.06 is finaly out! And since this update is quite extensive, I cut down the whole stuff on a few highlights: Completely reworked (and cleanly documented in English) plugin system! The system now no longer uses the Maillot UDF, but native WM_COPYDATA. Important: Old plugins must be equipped with the new isnautoitstudio_plugin.au3 file to work again. (More in the help) Printing is now also possible in color! The ISN AutoIt Studio has now several threads. (Autoit_Studio_Helper.exe) These threads will be used in the future to expose complex or ISN blocking functions. For the beginning, it only affects the testing a script / project and the search or installation of ISN AutoIt Studio Updates. In the "Data" folder of the ISN AutoIt Studio is now a new .exe with the name "ISN_cmd.exe". This allows the ISN Autit Studio to be controlled via command line switches. (See help) Plugins can now be packed into package files (* .icp file). This is also the new default format for plugins from my homepage. Furthermore, the standard directory for user-installed plugins has changed from the ISN AutoIt Studio folder to the folder % myisndatadir% \ Data \ Plugins. I would like to thank Dave Thijse for the numerous tests and bugreports of this update! So there is a lot of work in this update. Of course I would appreciate your feedback! Have fun with it! And here is the complete changelog (translated by google): -> ISN AutoIt Studio: <- ----------------------------------- [Fixes] - Various bug fixes - Bug fixed in the parameter editor. (Empty parameters between completed parameters are now automatically filled in with "-1") - When creating a new task in the ToDo list, the wrong date was used. This is now fixed. - Sometimes the Autocomplete did not work properly. (No suggestions were displayed when writing) This should now be fixed. - Changes in the script by various actions were often not recognized as changes in the ISN. This is now fixed. - The window of a plug-in was placed over the windows of the ISN AutoIt Studio. This is now fixed. [Improvements] - After the compilation, open au3 files are only read-in again into the editor when changes are made to the file. (Eg increase of the version by the AutoIt3Wrapper) - The ISN AutoIt Studio now contains version 17.224.935.0 of the "AutoIt3Wrappers" - Some GUIs have an icon next to the title - The ISN AutoIt Studio now starts a bit faster. - Due to persistent problems with the ISN hotkeys (especially with multiple instances), the ISN AutoIt Studio now uses Yashied's HotKey UDF. These problems should now be fixed. - The testing of a script or project now blocks the ISN no longer! (Testscript is now put into a separate thread) - Mini Debug GUI Graphically revised - The "last used files" are now also saved with path variables. - The last selected element in the script tree is now selected again after updating the script tree - If the CTRL key is released after CTRL + CTRL, you can quickly switch to the previous tab - Help file of ISN AutoIt Studios updated (German and English) [New features] - Printing is now also possible in color! Furthermore, the entry "Print" has been added in the context menu of the script editor. If text is selected in the script editor, only this is printed. If not, the whole file is printed (currently limited to 50,000 characters for performance reasons!). - Intermediate markers (CTRL + F2) can now also be jumped back and forth. (F2 / SHIFT + F2) - Attention: The AutoIt tools "Tidy" or "Au3Stripper" are now NOT included in the ISN AutoIt Studio package. The paths to the tools must therefore be specified in the program settings. However, you can download and install these tools from the autitscript.com website at any time. (Tidy and Au3Stripper are included eg in the AutoIt complete package (SciTE4AutoIt3.exe)) If you are able to manage the settings of the Tidy.ini via the ISN AutoIt Studio, the path to the tidy.ini must also be specified here! - Hotkeys can now also use the following keys: Windows Logo Key, Delete, Insert, End, Print, Home - Added new hotkeys: Print, Clear all parameters (Parameter Editor), Clear current parameters (Parameter editor) - In the Mini Debug GUI (When testing a script), there is now a new button (Details) showing additional information about the running script. (Eg a graph of CPU or RAM utilization) - The default directory for user-installed plugins has been changed from the ISN AutoIt Studio folder to the folder %myisndatadir%\Data\ Plugins. Standard plugins, such as. The Form Studio 2, but still remain in the ISN AutoIt Studio folder. - Whether a plugin is active or inactive, is now no longer saved in the plugin itself (plugin.ini) in the config.ini of the ISN AutoIt Studios. By default, the active plugins are set to the ISN FormStudio 2 and the Fileviewer plug-in. If further plugins are installed, they must be activated again if necessary. - Plugins can now be packed into a separate package (*.icp file). In this format, Now also the plugins offered by my homepage. A simple opening of this file is sufficient and the plugin is installed. (Manual installation is also possible in the program settings -> plugins) The plugin does not have to be copied into the Plugins folder "by hand" anymore. - The ISN AutoIt Studio includes a new plugin by default. The plugin named "ISN Plugin SDK Tools" provides some useful tools for developing ISN plugins. So plugins eg. With this tool into compressed * .icp files. Or even when translating * .lng files, the plugin can be helpful. (BETA! The tool is extended!) Furthermore, you will always find the latest "isnautoitstudio_plugin.au3" file for your plugins. The plugin is disabled by default. - New function in the script tree settings: Select the last modified function in the script tree. The last modified function is always selected in the script tree. (But is not active by default and has to be activated in the program settings under "Script editor -> Script tree"!) - The ISN AutoIt Studio now has several threads. (Autoit_Studio_Helper.exe) These threads will be used in the future to expose server-intensive or ISN blocking functions. For the beginning, it only affects the testing of a Script / project and the search or installation of ISN AutoIt Studio Updates. - Elements in the script tree can now be dragged and dropped into the script. - new translation: Portugues-Brasil (thx to Odaylton) - In the "Data" folder of the ISN AutoIt Studio is now a new .exe with the name "ISN_cmd.exe". This allows the ISN Autit Studio to be controlled via command line switches. The whole is however only in the initial stage! So be further developed! You can find current commands with ISN_cmd.exe /? - The plugin system now no longer uses the MailSlot UDF to communicate with the plugins. The whole thing now runs over WM_COPYDATA. (For further information, see below in Plugin SDK) -> ISN Form Studio 2: <- ----------------------------------- [Fixes] - Various bug fixes - No white background color (0xFFFFFF) could be defined for InputControls. This is now fixed. [Improvements] - Adaptations to the new plug-in system (WM_COPYDATA) - Inconsistent specification of the $ character in handles fixed. Handles should now be given (as actually standard) with the $ character. If not, the FormStudio does not correct this independently. -> Simple File Viewer: <- ----------------------------------- [Fixes] - Various bug fixes [Improvements] - Adaptations to the new plug-in system (WM_COPYDATA) -> Plugin SDK: <- ----------------------------------- - The plugin UDF (isnautoitstudio_plugin.au3) was completely re-created and cleanly documented in English. Furthermore, the UDF has been expanded by numerous new functions. - The plugin SDK now no longer uses the MailSlot UDF! Data is now exchanged via WM_COPYDATA. If you have created plugins yourself. These must only be easily adapted so that they can function again! You only have to replace the new "isnautoitstudio_plugin.au3" file in your own plugins (from the PLUGIN SDK FOLDER) and recompile the plugin. If you have used the function "_Mailslot_abhore" for ISN events from the demo plugin, this must be easily updated. (Check out the new demo plugins on my homepage) Old plugins communicating via the MailSlot UDF are no longer supported! - All plugins offered on my homepage have been upgraded to the new plugin system (WM_COPYDATA). - Many known functions now offer more possibilities than before. For example, the command "_ISNPlugin_Call_Function_in_ISN_AutoIt_Studio" (old UDF: _ISNPlugin_Starte_Funktion_im_ISN) now returns the result of the call. The same is true for "_ISNPlugin_Execute_in_ISN_AutoIt_Studio". - With "_ISNPlugin_Get_Variable_from_ISN_AutoIt_Studio" you can now also transfer arrays from the ISN AutoIt Studio into the plugin. - There are no plugin types anymore! (So far, there were Type 1, 2 and 3, with different possibilities in each case) From now on: Plugin is Plugin! The desired options can be controlled as before via the plugin.ini. However, from now on, the plug-in type is no longer required. You can find information about the plugin.ini in the help file of the ISN AutoIt Studio. - Events from the ISN AutoIt Studio (eg save) can now be easily registered with the function "_ISNPlugin_Register_ISN_Event". Thus no separate "monitoring" function is necessary. (Such as in the Demoplugin with _Mailslot_abhoeren was the case) - Many many new features with which the ISN Studio can be controlled. (Or can retrieve data from the ISN)
    1 point
  8. Hi @rajeevsing15 This is how you could try to do it: 1°) use _FileReadToArray() to read the file replace.txt 2°) use _ArrayColInsert() to add a column to the array containin the replace.txt file lines 3°) use StringSplit() to split each line of replace.txt in two using "|" as a delimiter character and store the 2 result substrings in the 2 columns of the array. This way the first column of the array contains the text to look for and the second column contains the text to replace to. 4°) Use FileRead() to read the .txlf file and find the text stored in the first column of the array. If found, use StringReplace() to replace the found text by the text stored in the 2nd column of the array. 5°) Save the modified file using FileWrite()
    1 point
  9. I wanted to display some KPIs of the company I’m working for and other management communications altogether with more fancy stuff on a large 42 inch LCD monitor, preferably simultaneously as the screen resolution of 1920 x 1080 permits This is version 1.0 of the presentation manager I wrote. The ini file for the demo will pick-up the files from the Internet and display the result on a 1280 x 960 resolution. If your screen has a lower resolution, some of the results will be shown to your neighbours = but it will still function. The different GUIs are managed in a parallel process (each of them can display during variable times and position. Read the ini file for more info I didn’t make an ini management module (yet) Quit the application via the tray menu. Let me know what you think. GreenCan Presentation Manager.au3 #include <GUIConstants.au3> #include <WindowsConstants.au3> #Include <Array.au3> #include <Misc.au3> #include <ButtonConstants.au3> #include <Timers.au3> #include <Date.au3> If _Singleton(@ScriptName,1) = 0 Then Opt("TrayIconHide", 1) Exit EndIf Global $version = "1.00" , $VersionDate = "Februari 2010" Local $_Width, $_Height, $_Left, $_Top, $_Offset_Width, $_Offset_Height, $_Offset_Left, $_Offset_Top TraySetToolTip ("Presentation Manager") #Region Tray settings Opt("TrayMenuMode", 1) Opt("TrayOnEventMode", 1) TraySetClick(9+4) ; Only Primary mouse button will show the tray menu. $About_tray = TrayCreateItem("About") TrayItemSetOnEvent(-1, "AboutWindow") TrayCreateItem("") $exit_tray = TrayCreateItem("Quit Presentation Manager") TrayItemSetOnEvent(-1, "Quit") TraySetState(1) #EndRegion Tray settings ; ini file expected in the same directory as the script $iniFile = @ScriptDir & "\Presentation Manager.ini" ; the different html loops will be in this array Global $BrowserInstances = IniRead($inifile,"Global","Instances","") If @error Then MsgBox(48, "Error", "Error occurred while trying to open " & $inifile) Exit ElseIf $BrowserInstances = "" Then MsgBox(48, "Error", "Instances not defined") Exit EndIf $BrowserInstanceNames = StringSplit($BrowserInstances,",",2) $BrowserInstances = StringSplit($BrowserInstances,",",2) For $runs = 0 to UBound($BrowserInstances)-1 ; must be without space to work $BrowserInstances[$runs] = StringStripWS($BrowserInstances[$runs],3) $BrowserInstanceNames[$runs] = StringStripWS($BrowserInstanceNames[$runs],3) Next Dim $GUIActiveX[UBound($BrowserInstances)], $GUI[UBound($BrowserInstances)] For $runs = 0 to UBound($BrowserInstanceNames)-1 ; For Embedding Mozilla Object inside an AutoIt GUI, download Mozilla ActiveX Control (search on the Internet) ; Syntax: $BrowserObject1 = ObjCreate("Mozilla.Browser") ; Get the Mozilla ActiveX instance $BrowserInstances[$runs] = ObjCreate("Shell.Explorer.2") ; Get the Internet Explorer ActiveX instance If Not IsObj($BrowserInstances[$runs]) Then Msgbox(0,"Browser Object","Can't find Explorer ActiveX Control") Exit EndIf $_Width = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Width",0) $_Height = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Height",0) $_Left = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Left",0) $_Top = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Top",0) $_Offset_Width = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Offset_Width",0) $_Offset_Height = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Offset_Height",0) $_Offset_Left = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Offset_Left",0) $_Offset_Top = IniRead($inifile,$BrowserInstanceNames[$runs] ,"Offset_Top",0) ; Create a borderless GUI & Browser instance for output $GUI[$runs] = GUICreate ( $BrowserInstanceNames[$runs] , $_Width, $_Height, $_Left, $_Top, $WS_POPUP ) $GUIActiveX[$runs] = GUICtrlCreateObj($BrowserInstances[$runs], $_Offset_Width, $_Offset_Height, $_Width + $_Offset_Left, $_Height + $_Offset_Top ) ; all GUI are hidden by Default GUISetState (@SW_HIDE ,$GUI[$runs]) Next ; read the parallel sequences to manage Local $Sequences = IniRead($inifile,"Global","Sequences","") $Sequences = StringSplit($Sequences,",",2) Dim $SequencePageHolder[UBound($Sequences)][3] Dim $Pages[UBound($Sequences)] Dim $keepInstance[UBound($Sequences)][2] For $runs = 0 to UBound($Sequences)-1 $SequencePageHolder[$runs][0] = 1 ; sequence $SequencePageHolder[$runs][1] = TimerInit() $SequencePageHolder[$runs][2] = 1 ; put the sequence elements in an array $Pages[$runs] = IniReadSection($inifile, $Sequences[$runs]) ; keep the active instance per sequence in a table $keepInstance[$runs][0] = StringStripWS($Sequences[$runs],3) ; The sequence name $Page = split_it($Pages[$runs],$SequencePageHolder[$runs][0]) $keepInstance[$runs][1] = $Page[0] ; The active GUI Next $first_pass = True While 1 For $runs = 0 to UBound($Sequences)-1 $Sequences[$runs] = StringStripWS($Sequences[$runs],3) ; must be without space to work $Page = split_it($Pages[$runs],$SequencePageHolder[$runs][0]) If $SequencePageHolder[$runs][0] = $SequencePageHolder[$runs][2] Or $first_pass = True Then If TimerDiff($SequencePageHolder[$runs][1]) > ($Page[2] * 1000) Or $first_pass = True Then ; check if $BrowserInstanceNames changes and hide the previous one $Index = _ArraySearch($keepInstance, $Sequences[$runs], 0, 0, 0, 0, 1, 0) If $Page[0] <> $keepInstance[$Index][1] Then $inst = _ArraySearch($BrowserInstanceNames,$keepInstance[$Index][1]) GUISetState (@SW_HIDE ,$GUI[$inst]) $keepInstance[$Index][1] = $Page[0] EndIf ;ConsoleWrite($Sequences[$runs] & @CR & $SequencePageHolder[$runs][0] & @CR & $Page[0] & @CR & $Page[1] & @CR & $Page[2] & @CR & TimerDiff($SequencePageHolder[$runs][1]) & " = " & ($Page[2] / 1) & @CR & @CR) $SequencePageHolder[$runs][1] = TimerInit() ; re-initilize timer If $SequencePageHolder[$runs][0] < UBound($Pages[$runs])-1 Or $first_pass = True Then $SequencePageHolder[$runs][2] += 1 Else $SequencePageHolder[$runs][2] = 1 EndIf ; show the brwoser instance (if hidden) and display the page $inst = _ArraySearch($BrowserInstanceNames,$Page[0]) $BrowserInstances[$inst].navigate($Page[1]) GUISetState (@SW_SHOW ,$GUI[$inst]) EndIf EndIf If $SequencePageHolder[$runs][0] < UBound($Pages[$runs])-1 Then $SequencePageHolder[$runs][0] += 1 Else $SequencePageHolder[$runs][0] = 1 EndIf Next $first_pass = False ;sleep(2000) ; let the processor cool down =:) _ReduceMemory() WEnd #FUNCTION# ============================================================== Func split_it($Array,$item) Return StringSplit($Array[$item][1],",",2) EndFunc ;==>split_it #FUNCTION# ============================================================== Func Quit() For $runs = 0 to UBound($BrowserInstanceNames)-1 $BrowserInstances[$runs] = 0 GUIDelete($GUI[$runs]) Next Exit EndFunc ;==>Quit #FUNCTION# ============================================================== Func _ReduceMemory() Local $dll_mem = DllOpen(@SystemDir & "\psapi.dll") Local $ai_Return = DllCall($dll_mem, 'int', 'EmptyWorkingSet', 'long', -1) If @error Then Return SetError(@error, @error, 1) Return $ai_Return[0] EndFunc ;==>_ReduceMemory #FUNCTION# ============================================================== Func AboutWindow() Local $window_width = 250, $window_heigth = 110, $msg4 Local $About = GuiCreate(" Presentation Manager", $window_width, $window_heigth, -1,-1,$WS_CAPTION, $WS_EX_TOPMOST) GuiCtrlCreateLabel("Author: A. Goethals" & @CR & "Ver " & $version & @CR & $VersionDate, ($window_width-120)/2, 10,120,50) GuiCtrlCreateLabel("", 10,55, $window_width - 20,1) ; separator GuiCtrlSetBkColor(-1, 0xffffff) Local $ok = GUICtrlCreateButton("OK", 10, $window_heigth - 40, 70,22, $BS_DEFPUSHBUTTON ) #Region Perforated Image ; Perforated Image # ==> Start Local $_Left_pos, $_Top_pos, $_GUI_NAME $_Left_pos = $window_width - 145; 338 ; Replace with correct position $_Top_pos = $window_heigth - 20; 521 ; Replace with correct position _GuiImageHole($About, $_Left_pos, $_Top_pos, 136, 41) # <== End #EndRegion Perforated Image GUISetState() While 1 $msg4 = GUIGetMsg() Select Case $msg4 = $GUI_EVENT_CLOSE ExitLoop Case $msg4 = $ok ExitLoop EndSelect WEnd GUIDelete($About) Return EndFunc ;==>AboutWindow #FUNCTION# ============================================================== #Region Perforated Image #comments-start The lines below will generate the perforated image (bewteen start and end) Move these lines into your GUI code, usually just before GUISetState() Don't forget to fill in the correct coordinates for $Left_pos, $Top_pos and enter the GUI Window Handle in the last line # ==> Start Local $_Left_pos, $_Top_pos, $_GUI_NAME $_Left_pos = 10 ; Replace with correct position $_Top_pos = 10 ; Replace with correct position $_GUI_NAME = 'The name of your GUI window' _GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 136, 45) # <== End #comments-end #FUNCTION# ============================================================== Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height) Local $aClassList, $aM_Mask, $aMask #Region picture array Local $PictArray[262] = [ _ '3,1,48,1','50,1,137,1','3,2,48,2','50,2,93,2','94,2,137,2','1,3,2,3','4,3,47,3','49,3,92,3','95,3,137,3','1,4,3,4','5,4,25,4','28,4,46,4','48,4,92,4','95,4,137,4','1,5,3,5','5,5,25,5','29,5,45,5','48,5,92,5','95,5,137,5','1,6,4,6', _ '6,6,24,6','30,6,45,6','47,6,92,6','96,6,137,6','1,7,5,7','7,7,9,7','10,7,23,7','30,7,38,7','42,7,44,7','46,7,93,7','96,7,137,7','1,8,6,8','11,8,24,8','29,8,37,8','45,8,66,8','68,8,93,8','96,8,137,8','1,9,6,9','13,9,24,9','30,9,36,9', _ '44,9,66,9','69,9,87,9','91,9,93,9','97,9,137,9','1,10,6,10','13,10,23,10','31,10,37,10','43,10,65,10','71,10,86,10','92,10,93,10','97,10,137,10','1,11,6,11','12,11,22,11','32,11,35,11','42,11,65,11','71,11,86,11','92,11,93,11','97,11,137,11','1,12,6,12','15,12,22,12', _ '32,12,34,12','43,12,50,12','54,12,65,12','70,12,86,12','97,12,137,12','1,13,5,13','18,13,21,13','32,13,33,13','44,13,49,13','55,13,65,13','72,13,86,13','96,13,137,13','1,14,5,14','15,14,16,14','44,14,48,14','55,14,64,14','73,14,86,14','96,14,137,14','1,15,4,15','15,15,20,15', _ '45,15,48,15','54,15,64,15','74,15,85,15','96,15,137,15','1,16,4,16','17,16,19,16','46,16,48,16','55,16,63,16','75,16,84,16','96,16,137,16','1,17,5,17','17,17,18,17','46,17,47,17','56,17,63,17','76,17,84,17','97,17,137,17','1,18,5,18','17,18,18,18','46,18,47,18','56,18,63,18', _ '77,18,84,18','97,18,137,18','1,19,6,19','16,19,18,19','33,19,34,19','57,19,63,19','77,19,84,19','98,19,137,19','1,20,6,20','16,20,17,20','32,20,34,20','58,20,63,20','77,20,84,20','98,20,137,20','1,21,6,21','16,21,17,21','32,21,34,21','58,21,63,21','78,21,83,21','98,21,137,21', _ '1,22,6,22','32,22,34,22','58,22,63,22','78,22,83,22','98,22,137,22','1,23,6,23','57,23,64,23','78,23,82,23','98,23,137,23','1,24,6,24','57,24,65,24','78,24,82,24','98,24,137,24','1,25,6,25','58,25,65,25','77,25,82,25','99,25,137,25','1,26,6,26','58,26,64,26','76,26,83,26', _ '99,26,137,26','1,27,7,27','32,27,33,27','46,27,47,27','58,27,64,27','77,27,83,27','100,27,137,27','1,28,7,28','31,28,33,28','46,28,47,28','58,28,65,28','77,28,83,28','99,28,137,28','2,29,7,29','31,29,33,29','59,29,65,29','78,29,84,29','98,29,137,29','7,30,8,30','16,30,18,30', _ '31,30,33,30','46,30,47,30','59,30,65,30','79,30,84,30','96,30,137,30','8,31,10,31','15,31,18,31','25,31,26,31','31,31,34,31','45,31,47,31','60,31,62,31','79,31,85,31','95,31,137,31','3,32,6,32','8,32,10,32','15,32,21,32','25,32,26,32','33,32,34,32','42,32,48,32','60,32,62,32', _ '78,32,85,32','95,32,137,32','34,33,35,33','39,33,40,33','42,33,49,33','60,33,62,33','76,33,86,33','95,33,120,33','125,33,130,33','135,33,137,33','38,34,39,34','44,34,51,34','76,34,88,34','95,34,122,34','125,34,129,34','131,34,134,34','135,34,137,34','47,35,51,35','55,35,60,35','64,35,65,35', _ '76,35,88,35','95,35,121,35','123,35,124,35','126,35,128,35','130,35,134,35','135,35,137,35','49,36,51,36','56,36,62,36','65,36,66,36','69,36,70,36','76,36,81,36','83,36,88,36','95,36,120,36','122,36,124,36','126,36,127,36','129,36,137,36','56,37,58,37','66,37,70,37','76,37,78,37','84,37,88,37', _ '95,37,120,37','122,37,124,37','126,37,127,37','129,37,131,37','135,37,137,37','67,38,71,38','77,38,79,38','84,38,89,38','95,38,119,38','126,38,127,38','129,38,132,38','134,38,137,38','32,39,33,39','85,39,89,39','95,39,118,39','120,39,124,39','126,39,127,39','129,39,132,39','134,39,137,39','18,40,24,40', _ '26,40,41,40','86,40,89,40','95,40,117,40','121,40,123,40','127,40,128,40','134,40,137,40','14,41,46,41','85,41,89,41','95,41,137,41','9,42,52,42','88,42,89,42','97,42,137,42','7,43,55,43','57,43,59,43','62,43,65,43','67,43,69,43','70,43,73,43','100,43,137,43','6,44,79,44','100,44,137,44', _ '4,45,81,45','100,45,137,45'] #EndRegion picture array ; get the size of the active window Local $size = WinGetClientSize($window_handle) Local $Window_width = $size[0] Local $Window_height = $size[1]+33 ; including the title bar ; First hide the window $aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF) $aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0) ; rectangle A - left side $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle B - Top $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $Window_width, 'long', $pos_y) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle C - Right side $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Image_Width , 'long', 0 , 'long', $Window_width + 30, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle D - Bottom $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $Window_width, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; now unhide all regions as defined in array $PictArray For $i = 0 To (UBound($PictArray) - 1) $Block_value = StringSplit($PictArray[$i],',') $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 1 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) Next DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1) $PictArray='' ; empty array EndFunc ;==>_GuiImageHole #FUNCTION# ============================================================== Func _WinGetClassListEx($sTitle) Local $sClassList = WinGetClassList($sTitle) Local $aClassList = StringSplit($sClassList, @LF) Local $sRetClassList = '', $sHold_List = '|' Local $aiInHold, $iInHold For $i = 1 To UBound($aClassList) - 1 If $aClassList[$i] = '' Then ContinueLoop If StringRegExp($sHold_List, '\|' & $aClassList[$i] & '~(\d+)\|') Then $aiInHold = StringRegExp($sHold_List, '.*\|' & $aClassList[$i] & '~(\d+)\|.*', 1) $iInHold = Number($aiInHold[UBound($aiInHold)-1]) If $iInHold = 0 Then $iInHold += 1 $aClassList[$i] &= '~' & $iInHold + 1 $sHold_List &= $aClassList[$i] & '|' $sRetClassList &= $aClassList[$i] & @LF Else $aClassList[$i] &= '~1' $sHold_List &= $aClassList[$i] & '|' $sRetClassList &= $aClassList[$i] & @LF EndIf Next Return StringReplace(StringStripWS($sRetClassList, 3), '~', '') EndFunc ;==>_WinGetClassListEx #FUNCTION# ============================================================== #EndRegion Perforated Image #EndRegion Functions Presentation Manager.ini [Global] # Information # SECTION [Global] # Instances: # These are the different html instances that are controlled by Presentation Manager # You need at least one instance and another one for each different sized GUIbox you want to display # You don't have to use all the Instances that you create, just let them sleep in your ini until you need them # Example: (The names can be freely choosen) # Instances= HomeDIA_Show, HomeWeather, HomeWeatherMap, HomePictures # An Instance refers to a section of the 'same' name containing: # 1. Position and size of the GUI to display # 2. Offset position of the url (the ActiveX Object) inside the GUI Window # Example: (The name has to be the same as refered by the Instances line) # [HomeDIA_Show] # Width=750 # Height=600 # Left=20 # Top=20 # Offset_Left=+50 # Offset_Top=+180 # Offset_Width=-20 # Offset_Height=-50 # Sequences: # These are the different GUI assemblies that will display simultaneously on the monitor # The Sequences will run and refresh in parallel (in a way), independently from each other # Why is a sequence necessary? # You can run different urls with different GUI Window sizes on the same position of your monitor # If the Instance name changes, the previous GUI will be hidden (to avoid overlaying) # You can create as many Sequences as you like (but you will need an extra large monitor to display all these GUIs at the same moment # Example: (The names can be freely choosen) # Sequences=RH_UP, LH_UP, LH_LOW, LOW_CENTER # A Sequence refers to a section of the same name containing one or more urls # Example: (The name has to be the same as refered by the Sequences line) # [LOW_CENTER] # url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/133_small.jpg,2 # url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF2950_small.jpg,2 # url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF0970_small.jpg,2 # url=HomePictures1,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF2005_small.jpg,2 # each url line is composed of 3 elements: # 1. Name of the instance # 2. url (either http, can also be a directory on your local PC or network server # 3. display time in milliseconds # Don't worry about the the ini key always being the same, the key is not used. # By GreenCan Instances=HomeDIA_Show, HomeWeather, HomeWeatherMap, HomePictures1, HomePictures2, PPT Sequences=RH_UP, LH_UP, LH_LOW, LOW_CENTER [LH_UP] url=HomeWeather,http://news.bbc.co.uk/weather/forecast/37,300 [LH_LOW] url=HomeWeatherMap,http://weer.nieuws.nl.msn.com/region.aspx?wealocations=Brussels+Hoofdstedelijk+Gewest,240 [RH_UP] url=HomeDIA_Show,http://home.base.be/goethals.baeyens/slideshow2.html,120 [LOW_CENTER] url=PPT,http://home.base.be/goethals.baeyens/ppt/demo_pg1.htm,4 url=PPT,http://home.base.be/goethals.baeyens/ppt/demo_pg2.htm,4 url=PPT,http://home.base.be/goethals.baeyens/ppt/demo_pg3.htm,4 url=PPT,http://home.base.be/goethals.baeyens/ppt/demo_pg4.htm,4 url=PPT,http://home.base.be/goethals.baeyens/ppt/demo_pg5.htm,4 url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/133_small.jpg,2 url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF2950_small.jpg,2 url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF0970_small.jpg,2 url=HomePictures1,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF2005_small.jpg,2 url=HomePictures1,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF2947_small.jpg,2 url=HomePictures1,http://home.base.be/goethals.baeyens/Gallery01/Images/DSCF4564_small.jpg,2 url=HomePictures1,http://home.base.be/goethals.baeyens/Gallery01/Images/PDRM0736_small.jpg,2 url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/Tulp_Beige_small.jpg,2 url=HomePictures2,http://home.base.be/goethals.baeyens/Gallery01/Images/Tulp_Deep_Yellow_small.jpg,2 [HomePictures1] Width=160 Height=105 Left=350 Top=720 Offset_Width=-20 Offset_Height=-20 Offset_Left=+50 Offset_Top=+50 [HomePictures2] Width=160 Height=160 Left=350 Top=720 Offset_Width=-20 Offset_Height=-20 Offset_Left=+50 Offset_Top=+50 [HomeDIA_Show] Width=750 Height=600 Left=20 Top=20 Offset_Width=-20 Offset_Height=-50 Offset_Left=+50 Offset_Top=+180 [HomeWeather] Width=410 Height=508 Left=835 Top=360 Offset_Width=-200 Offset_Height=-242 Offset_Left=+250 Offset_Top=+280 [HomeWeatherMap] Width=450 Height=329 Left=820 Top=20 Offset_Width=-15 Offset_Height=-245 Offset_Left=+35 Offset_Top=+265 [PPT] Width=459 Height=345 Left=250 Top=600 Offset_Width=0 Offset_Height=0 Offset_Left=0 Offset_Top=0
    1 point
×
×
  • Create New...