I'm making admin for my game and the prefix is the greater than sign (>), it is binded by context action service and when you press > it will open the admin bar. But it's not working, I tried disabling mouselock and disabling emotes menu but it still doesn't work.
Code:
local cas = game:GetService("ContextActionService")
local ts = game:GetService("TweenService")
cas:BindAction("PrefixPressed", function(_, inputState)
if inputState == Enum.UserInputState.Begin then
--tween
end
end, true, Enum.KeyCode.GreaterThan)
Related
I'm calling Office.context.ui.displayDialogAsync() in a word add-in. The dialog displays the message "ADD-IN ERROR The add-in could not be started. Please restart all Office applications and try again." But the displayDialogAsync() callback gives the succeeded status.
The page is a https URL with the same domain. (I'm testing on localhost.)
I can open the same URL with window.open() so I know the page exist.
Anyone knows what could be the reason for the error message, or how to get better diagnostics?
If you specified callback when calling the displayDialogAsync method, you may check result.error.code and result.error.message. As soon as you know what the actual error is, you can start troubleshooting, for example:
var dialog;
Office.context.ui.displayDialogAsync('https://myDomain/myDialog.html',
function (asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
showNotification(asyncResult.error.code = ": " + asyncResult.error.message);
} else {
dialog = asyncResult.value;
dialog.addEventHandler(Office.EventType.DialogMessageReceived, processMessage);
}
});
Check out the Handle errors and events in the Office dialog box for well-known errors.
Also you may find the Troubleshoot development errors with Office Add-ins page helpful.
Also make sure that the Protected mode is turned off in Windows.
In Windows 11, Protected Mode settings are missing in Internet Options, but you still can modify them via registry editor. These settings are stored in HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones. Under Zones is a subkey for each zone, named numerically:
0 is the Local Machine zone
1 is the Intranet zone
2 is the Trusted Sites zone
3 is the Internet zone
4 is the Restricted Sites zone
Under each numerically-named key, you can create or set a REG_DWORD value named 2500 to control whether Protected Mode is enabled for the zone. Setting that value to 0 enables Protected Mode; a setting of 3 disables it.
So, to disable Protected Mode for the Internet zone, set this entry to 3:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\2500
I'm attempting to create a plugin that fetches additional code from a server before the user plays the game on roblox studio.
Basically, the user will use something like blockly to create luau code on a website and I want to sent that code to roblox studio. I've seen some plugins that fetch new data from a server from time to time and I've been able to do that, but I'd like to see if there's a way to only fetch the new code when the user clicks the play button because it could be expensive to request new data every 5 seconds or so.
Below is a simple plugin that attempts to send a request to the server when the game loads, but the script never goes beyond game.Loaded:Wait()
Main file:
local Request = require(script.Parent.Request)
local URL = "http://localhost:3333"
local toolbar = plugin:CreateToolbar("Test")
local button = toolbar:CreateButton("Test", "Test", "rbxassetid://4458901886")
local isListening = false
local request = Request.new()
local ok
local json
local function onClick ()
isListening = not isListening
if (isListening == false) then
return print("Not listening")
end
print("Listening")
if not game:IsLoaded() then
print(game.Loaded)
game.Loaded:Wait()
print("Game has started")
ok, json = request:Get(URL)
print(ok, json)
end
end
button.Click:Connect(onClick)
Request file:
local Request = {}
Request.__index = Request
function Request.new()
return setmetatable({}, Request)
end
function Request:Get(URL)
local ok, result = pcall(game.HttpService.GetAsync, game.HttpService, URL)
local json = game.HttpService:JSONDecode(result)
return ok, json
end
return Request
There isn't an explicit signal to detect when a game is about to start.
But, whenever you hit the Play button, the Edit session ends and the Play session begins. When a session ends, all of the plugins are unloaded. So you could use the plugin.Unloading signal to detect when the Edit session is ending, but it will also fire when the user closes the place, when you stop play testing, or when the plugin is disabled or uninstalled.
You could combine that signal with the RunService:IsEdit() function so that the behavior only triggers when exiting Edit mode, but this is still a really hazy signal.
So in a Script in your plugin, you could do something like this :
local RunService = game:GetService("RunService")
local Request = require(script.Parent.Request)
local URL = "<YOUR URL>"
-- listen for when sessions end
plugin.Unloading:Connect(function()
-- disregard sessions that aren't Edit Mode
if not RunService:IsEdit() end
return
end
print("Game about to start... maybe. The game might also be closing, or the plugin might be disabled from the PluginManager.")
local ok, json = request:Get(URL)
print(ok, json)
end)
Debugging this may be difficult as the Output console is cleared any time you start a Play session, so you won't see any of your print statements. But if you close the place, your logs will be preserved on the Welcome Screen. Just go View > Output to open the Output window.
I'm trying to create a Selenium script in Powershell that automatically buys something that I tell it to. I've gotten it past finding the item, and clicking the Buy Now button, but then this window pops up and I've tried what seems like 3000 different ways of failing to click the Place your order button. Web code to the right. Appears to be the "turbo-checkout-pyo-button", but finding it by ID, XPath, CSSselector, etc have all failed for me. It's not a wait issue. I've even thrown in an explicit (and overly long) 5 second delay to be sure this field is present and "should" be clickable. Any ideas?
I've tried all of these. They're all followed by $placeYourOrderBtn.click() (and have all failed):
$placeYourOrderBtn = $ChromeDriver.FindElementByXpath("//*[#id='turbo-checkout-pyo-button']")
$placeYourOrderBtn = $ChromeDriver.FindElementByXPath("//*[#id='turbo-checkout-place-order-button']")
$placeYourOrderBtn = $ChromeDriver.FindElementByXPath("//span[text() = Place your order]")
$placeYourOrderBtn = $ChromeDriver.FindElementById("turbo-checkout-place-order-button-announce")
$placeYourOrderBtn = $ChromeDriver.FindElementById("turbo-checkout-pyo-button")
$placeYourOrderBtn = $ChromeDriver.FindElementByCssSelector("#turbo-checkout-pyo-button")
I did this for a windows that sends email. You have to click the button to open the new window, then use "SwitchTo()" to change to the new window.
[void]$Webdriver.SwitchTo().Window($WebDriver.WindowHandles[1])
You may have to read the window handles attribute and query each one to determine which one you need to open.
I'm using a pre-made code door in which the player(s) must enter correct passwords to pass through. I would like the last door the local player must go through to kill them if they guess the password wrong. The door is a 2323 code door. It already came with a script. I've tried to edit the code for the incorrect password:
Input = ""
local player = game.Players.LocalPlayer
local character = player.Character
character.health = 0
print("Wrong Code")
However, I get a nil value "Character."
Any idea what I am doing wrong? Thanks.
You cannot access localplayer from a server script. Here is what you can do alternatively:
Make server script
Make a remote event
Fire the remote event with the password as the arg
Put this in your server script:
local remoteevent = -- reference remote event path here
local correctpass = 2323
remoteevent.OnServerEvent:Connect(function(p, pass)
-- p is player and pass is the password the user entered
if tonumber(pass) == correctpass then
-- User entered correct pass so open the door
else
p.Character.Humanoid.Health = 0
end
end)
And finally, fire the remote event from the local script just like this:
local remoteevent = -- reference remote event path here
local userinput = -- get the password the user entered here
remoteevent:FireServer(userinput)
I want to automate some operations for my works so I record a Script on SAP GUI(SAP LOGON PAD 720), then use it to create a excel macro and it works perfectly on my computer, but when I try to run it in other computers, it doesn't work at all and when I record the same process in other PC's the Script's code is different than that one which appeared in my PC. I want to know how this can be possible, how can I change the "code form" or "code language" on my PC so when I record a script it can be used on every computer.
This is the Script from my PC
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "vl03n"
session.findById("wnd[0]").sendVKey 0
'This is the script I recorded from my computer,in other pc this "LIKP-VBELN" doesnt appear
session.findById("wnd[0]/usr/ctxtLIKP-VBELN").text = "8105148724"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[7]").press
And this is if I record the same process from others PC's
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "vl03n"
session.findById("wnd[0]").sendVKey 0
'here is when the error begin "LIKP-VBELN" doesnt appear anymore so that is why the macro doesnt work
session.findById("wnd[0]/usr/ctxt").text = "8105148724"
session.findById("wnd[0]/usr/ctxt").caretPosition = 10
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[7]").press
Check the LAN connection for the client and ensure its set to High Speed.
Regards,
ScriptMan