Answer the question
In order to leave comments, you need to log in
Powershell -replace -regexp -raw complicated replacement with tabs?
There is a test.lua file (UTF-8) with the content:
function private.PostAuctionsThread(self, auctionInfo)
self:SetThreadName("SHOPPING_POST_AUCTIONS")
local auctionRecord = auctionInfo.record
local postFrame = private.frame.content.result.confirmation.post
private.frame.content.result.cancelBtn:Disable()
private.frame.content.result.postBtn:Disable()
private.frame.content.result.bidBtn:Disable()
private.frame.content.result.buyoutBtn:Disable()
postFrame.postBtn:Enable()
postFrame.closeBtn:Enable()
local undercut = (TSMAPI:GetCustomPriceValue(TSM.db.global.postUndercut, auctionRecord.itemString) or 1)
if undercut > auctionRecord.itemBuyout then
undercut = 1
end
if TSMAPI.Player:IsPlayer(auctionRecord.seller, true, true, true) then
-- don't undercut ourselves
undercut = 0
end
local auctionBuyout
if auctionRecord.isFake then
auctionBuyout = TSMAPI:GetCustomPriceValue(TSM.db.global.normalPostPrice, auctionRecord.itemString) or 1000000
else
auctionBuyout = auctionRecord.buyout - (undercut * auctionRecord.stackSize)
end
<табуляция> if TSMAPI.Player:IsPlayer(auctionRecord.seller, true, true, true) then
<табуляция><табуляция> -- don't undercut ourselves
<табуляция><табуляция> undercut = 0
<табуляция> end
$text ="фрагмент"
$content = [System.IO.File]::ReadAllText(путьдо\test.lua")
(Get-Content 'путьдо\test.lua') -replace $test,"example" | Set-Content 'путьдо\test.lua'
if TSMAPI.Player:IsPlayer(auctionRecord.seller, true, true, true) then`n`t-- don't undercut ourselves...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question