diff --git a/scripts/startmenu/MiniBrowser.lnk b/scripts/startmenu/MiniBrowser.lnk new file mode 100644 index 0000000..3b446fb Binary files /dev/null and b/scripts/startmenu/MiniBrowser.lnk differ diff --git a/source/minibrowser.pb b/source/minibrowser.pb new file mode 100644 index 0000000..b44c9dd --- /dev/null +++ b/source/minibrowser.pb @@ -0,0 +1,76 @@ +; minibrowser.pb +; ------------------------------------------------------------ +; This is a minimalistic browser for admin purposes. +; It was derived from: MiniBrowser, (c) Fantaisie Software +; LICENSE : GPL +; AUTHOR : Michael H.G. Schmidt +; EMAIL : michael@schmidt2.de +; DATE : 20230213 +; ------------------------------------------------------------ +; + +Procedure ResizeWebWindow() + ResizeGadget(10, #PB_Ignore, #PB_Ignore, WindowWidth(0), WindowHeight(0)-52) + ResizeGadget(4, #PB_Ignore, #PB_Ignore, WindowWidth(0)-185, #PB_Ignore) + ResizeGadget(5, WindowWidth(0)-25, #PB_Ignore, #PB_Ignore, #PB_Ignore) + ResizeGadget(6, #PB_Ignore, #PB_Ignore, WindowWidth(0), #PB_Ignore) +EndProcedure + +If OpenWindow(0, 100, 200, 800, 600, "MiniBrowser", #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget) + + CreateStatusBar(0, WindowID(0)) + AddStatusBarField(#PB_Ignore) + StatusBarText(0, 0, "READY.", 0) + + ButtonGadget(1, 0, 3, 50, 25, "Back") + ButtonGadget(2, 50, 3, 50, 25, "Next") + ButtonGadget(3, 100, 3, 50, 25, "Stop") + StringGadget(4, 155, 5, 0, 20, "http://") + ButtonGadget(5, 0, 3, 25, 25, "Go") + FrameGadget(6, 0, 30, 0, 2, "", 2) ; Nice little separator + + If WebGadget(10, 0, 31, 0, 0, "http://DuckDuckGo.com") = 0 + + CompilerIf #PB_Compiler_OS <> #PB_OS_Windows + ; Linux and OX uses Webkit + MessageRequester("Error", "Webkit library not found", 0) + CompilerEndIf + End + + EndIf + + AddKeyboardShortcut(0, #PB_Shortcut_Return, 0) + + ; Use bindevent() to have a realtime window resize + BindEvent(#PB_Event_SizeWindow, @ResizeWebWindow()) + ResizeWebWindow() ; Adjust the gadget to the current window size + + Repeat + Event = WaitWindowEvent() + + Select Event + Case #PB_Event_Gadget + Select EventGadget() + Case 1 + SetGadgetState(10, #PB_Web_Back) + Case 2 + SetGadgetState(10, #PB_Web_Forward) + Case 3 + SetGadgetState(10, #PB_Web_Stop) + Case 5 + SetGadgetText(10, GetGadgetText(4)) + EndSelect + Case #PB_Event_Menu ; We only have one shortcut + SetGadgetText(10, GetGadgetText(4)) + EndSelect + + Until Event = #PB_Event_CloseWindow + +EndIf + +; IDE Options = PureBasic 5.73 LTS (Windows - x64) +; CursorPosition = 7 +; Folding = - +; EnableXP +; Executable = ..\tools\minibrowser.exe +; CompileSourceDirectory \ No newline at end of file diff --git a/tools/.gitignore b/tools/.gitignore index 488facd..fff6965 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -12,4 +12,5 @@ !isuseradmin.exe !prompt-user.exe !SFTA.exe +!minibrowser.exe diff --git a/tools/minibrowser.exe b/tools/minibrowser.exe new file mode 100644 index 0000000..895e090 Binary files /dev/null and b/tools/minibrowser.exe differ